Handles the output from downstream requests.
@param $req
@param $appStatus
@param $protoStatus
@return void
342321
public function endRequest($req, $appStatus = 0, $protoStatus = 0)
    {
        $c = pack('NC', $appStatus, $protoStatus) // app status, protocol status
            . "\x00\x00\x00";

        $this->server->send($req->fd,
            "\x01" // protocol version
            . "\x03" // record type (END_REQUEST)
            . pack('nn', $req->id, strlen($c)) // id, content length
            . "\x00" // padding length
            . "\x00" // reserved
            . $c // content
        );

        if ($protoStatus === -1) {
            $this->server->close($req->fd);
        }
//        elseif (!$this->pool->config->keepalive->value) {
//            $this->finish();
//        }
    }
304100
public function ipstats($req, $res, $args)
    {
        Container::get('hooks')->fire('controller.admin.users.ipstats');

        // Fetch ip count
        $num_ips = $this->model->getNumIp($args['id']);

        // Determine the ip offset (based on $_GET['p'])
        $num_pages = ceil($num_ips / 50);

        $p = (!Input::query('p') || Input::query('p') <= 1 || Input::query('p') > $num_pages) ?
            1 : intval(Input::query('p'));
        $start_from = 50 * ($p - 1);

        return View::setPageInfo([
            'title' => [Utils::escape(ForumSettings::get('o_board_title')), __('Admin'),
                __('Users'), __('Results head')],
            'active_page' => 'admin',
            'admin_console' => true,
            'page' => $p,
            'paging_links' => '<span class="pages-label">' . __('Pages') . ' </span>' .
                Url::paginateOld($num_pages, $p, '?ip_stats=' . $args['id']),
            'start_from' => $start_from,
            'ip_data' => $this->model->getIpStats($args['id'], $start_from),
        ])->display('@forum/admin/users/search_ip');
    }
219757
function execute(req, res) {
  res.send(null, this.info.toString(req.args[0] ? '' + req.args[0] : null));
}
78412
function updateRequestStatus(request) {
    if (!request || !request.id || !request.status) { return; }
    dispatcher.handleViewAction({
        data: { request: request },
        type: 'update'
    });
    return request;
}
942255
private function sendResponse($codeStatus, $messageStatus) {
        header('Status: '.$codeStatus.' '.$messageStatus);
        if(!($this->data === null))
            $this->sendTypeData(self::DATA_JSON);
        else {
            header(self::CONTENT_TYPE_JSON);
            http_response_code($this->status);
            $data = [
                'message' => $messageStatus
            ];
            $data = json_encode($data);
            echo $data;
        }
    }
1155591
def output_callback(self, out, process_status):
        
        self.final_status.append(process_status)
        self.final_output.append(out)
1079885
public function execute()
    {
        if (defined('PSI_PLUGIN_PSSTATUS_PROCESSES') && is_string(PSI_PLUGIN_PSSTATUS_PROCESSES)) {
            if (preg_match(ARRAY_EXP, PSI_PLUGIN_PSSTATUS_PROCESSES)) {
                $processes = eval(PSI_PLUGIN_PSSTATUS_PROCESSES);
            } else {
                $processes = array(PSI_PLUGIN_PSSTATUS_PROCESSES);
            }
            if ((PSI_OS == 'WINNT') && (strtolower(PSI_PLUGIN_PSSTATUS_ACCESS) == 'command')) {
                foreach ($processes as $process) {
                    $this->_result[] = array($process, $this->process_inarray(strtolower($process), $this->_filecontent));
                }
            } else {
                foreach ($processes as $process) {
                    $this->_result[] = array($process, $this->process_inarray($process, $this->_filecontent));
                }
            }
        }
    }
872304
public function execute(Node $node, Application $application, Deployment $deployment, array $options = [])
    {
        $targetPath = $deployment->getApplicationReleasePath($application);
        $this->shell->executeOrSimulate(
            'cd '.$targetPath.' && FLOW_CONTEXT='.$options['context'].' ./flow typo3.flow:cache:flush',
            $node,
            $deployment
        );
    }
601748
public void run(final StatusUpdate onStatus,
                    final Command onCompletion) {
        //Ensure active analysis is cancelled
        cancelExistingAnalysis();

        //If there are no checks to run simply return
        if (rechecks.isEmpty()) {
            if (onCompletion != null) {
                onCompletion.execute();
                return;
            }
        }

        checkRunner.run(rechecks,
                        onStatus,
                        onCompletion);
        rechecks.clear();
    }
1368728
public function addStatus(OpportunityStatus $opportunityStatus): OpportunityStatus
    {
        @trigger_error(sprintf('The %s() method is deprecated since version 0.8. Use create() instead.', __METHOD__), E_USER_DEPRECATED);

        return $this->create($opportunityStatus);
    }
631452
public function defineStatus($varStatus) {

        $options = Array();

        /* Pega o request da página */
        if (isset($this->request['idselect']) and ! empty($this->request['idselect'])) {
            $regIds = $this->request['idselect'];
        } else if (isset($this->request['id']) and ! empty($this->request['id'])) {
            $regIds = Array($this->request['id']);
        } else {
            throw new \Exception('Nenhum identificador definido', 500);
        }

        /* Arquivo de configuração do datagrid */
        $configGrid = ZendConfigFile::fromFile($this->sessionAdapter->moduleIni . $this->request['__CONTROLLER__'] . DS . ((isset($options['iniGridName']) and ! empty($options['iniGridName'])) ? $options['iniGridName'] . ".ini" : "datagrid.ini"));
        $getParamsFieldGrid = $configGrid['gridfieldsconfig'];
        $getParamsGrid = $configGrid['gridconfig'];

        /* Coluna Primária do datagrid */
        $primaryKey = null;
        foreach ($getParamsFieldGrid as $key => $value) {
            if (strtolower($value['type']) == 'primarykey') {
                $primaryKey = $key;
            }
        }

        /* Seleciona a tabela padrão do datagrid */
        $db = \Cityware\Db\Factory::factory('zend');

        if (isset($getParamsGrid['grid']['schema']) and $getParamsGrid['grid']['schema'] != "") {
            $db->from($getParamsGrid['grid']['table'], null, $getParamsGrid['grid']['schema']);
        } else {
            $db->from($getParamsGrid['grid']['table']);
        }

        /* Verifica se é array ou não definindo o where */
        if (is_array($regIds)) {
            $inRegs = implode("','", $regIds);
            $db->where("{$primaryKey} IN ('{$inRegs}')");
        } else {
            $db->where("{$primaryKey} = '{$regIds}'");
        }

        /* Define o status */
        $db->update('ind_status', $varStatus);

        /* Executa a atualização */
        $db->setDebug(false);
        $db->executeUpdateQuery();
    }
1051718
public void doBuildStatus(StaplerRequest req, StaplerResponse rsp)
            throws IOException {
        rsp.sendRedirect2(req.getContextPath() + "/images/48x48/" + getBuildStatusUrl());
    }
819258
public void updateStatus(int statusId, StatusUpdate update) {
		getResourceFactory().getApiResource("/status/" + statusId)
				.entity(update, MediaType.APPLICATION_JSON_TYPE).put();
	}
1015153
public function output()
    {
        header('Content-type: application/json');
        $data = array(
            'status' => $this->status,
            'data' => $this->data
        );
        echo json_encode($data);
        die();
    }
983334
private static function execute(&$route, $params)
    {
        array_shift($params);

        if (static::runAppMiddleware() && static::runRouteMiddleware($route)) {
            static::prepare($route, $params);

            return true;
        }
    }
150293
public function sendOkStatus() {
    $Config = GiroCheckout_SDK_Config::getInstance();

    if ($Config->getConfig('DEBUG_MODE')) {
      GiroCheckout_SDK_Debug_helper::getInstance()->logNotificationOutput('sendOkStatus');
    }

    header('HTTP/1.1 200 OK');
  }
490517
public function processSapiRequest()
    {
        $http = $this->builder->components()->http();
        $serverRequest = $http->sapiServerRequest();

        $response = $this->processor()->process($serverRequest);

        $http->output(
            $response,
            $this->builder->context()->httpContext()
        );
    }