Noop send: only log the request

@return  bool    Success boolean.
543869
protected function _send()
	{
		$message = $this->build_message();

		logger(\Fuel::L_INFO, 'To: '.static::format_addresses($this->to), 'Email NoOp driver');
		logger(\Fuel::L_INFO, 'Subject: '.$this->subject, 'Email NoOp driver');
		logger(\Fuel::L_INFO, 'Header: '.$message['header'], 'Email NoOp driver');
		logger(\Fuel::L_INFO, 'Body: '.$message['body'], 'Email NoOp driver');

		return true;
	}
80197
public function stop()
    {
        $success = false;

        if ($this->pid > 0) {
            posix_kill($this->pid, 9);
            pcntl_waitpid($this->pid, $temp = 0, WNOHANG);

            $success = pcntl_wifexited($temp);

            $this->cleanThreadContext();
        }

        return $success;
    }
224825
public function allowRequest()
    {
        if ($this->config->get('circuitBreaker')->get('forceOpen')) {
            return false;
        }
        if ($this->config->get('circuitBreaker')->get('forceClosed')) {
            return true;
        }

        return !$this->isOpen() || $this->allowSingleTest();
    }
681930
public function isActiveSession()
    {
        // Check if session timeout is defined in application settings
        $sessionConfig = $GLOBALS['app']->getConfiguration()->getRawConfiguration('session');
        if (!empty($sessionConfig) && isset($sessionConfig['timeout']) && !empty($sessionConfig['timeout'])) {
            $sessionTimeout = $sessionConfig['timeout'];
        } else {
            $sessionTimeout = SESSION_TIMEOUT;
        }

        file_put_contents(getcwd().'/logs/session.log', print_r($_SESSION, 1));

        if(isset($_SESSION[self::GLOBAL_PREFIX.'last_accessed']) &&
            (time() - $_SESSION[self::GLOBAL_PREFIX.'last_accessed'] > $sessionTimeout)) {
            return FALSE;
        }

        return TRUE;
    }
743159
public function check() {
        if ($this->_checkCsrf() == true) {
            switch ($this->request->logged) {
                case '*' :
                    return true;
                    break;

                case 'true' :
                    if ($this->_checkLogged()) {
                        if ($this->_checkRole()) {
                            return true;
                        }
                        else {
                            $t = new Template($this->_configFirewall['forbidden']['template'], 'gcsfirewall', 0);
                            foreach ($this->_configFirewall['forbidden']['variable'] as $val) {
                                if ($val['type'] == 'var') {
                                    $t->assign([$val['name'] => $val['value']]);
                                }
                                else {
                                    $t->assign([$val['name'] => $this->useLang($val['value'])]);
                                }
                            }
                            echo $t->show();

                            $this->addError('The access to the page ' . $this->request->src . '/' . $this->request->controller . '/' . $this->request->action . ' is forbidden', __FILE__, __LINE__, ERROR_FATAL);

                            return false;
                        }
                    }
                    else {
                        $this->addError('The access to the page ' . $this->request->src . '/' . $this->request->controller . '/' . $this->request->action . ' is forbidden because the user must be logged', __FILE__, __LINE__, ERROR_FATAL);
                        $url = Url::get($this->_configFirewall['login']['name'], $this->_configFirewall['login']['vars']);

                        if ($url != "") {
                            $this->response->header('Location: ' . $url);

                            return false;
                        }
                        else {
                            $this->addError('The firewall failed to redirect the user to the url ' . $url, __FILE__, __LINE__, ERROR_FATAL);

                            return false;
                        }
                    }
                    break;

                case 'false' :
                    if ($this->_checkLogged() == false) {
                        return true;
                    }
                    else {
                        $this->addError('The access to the page ' . $this->request->src . '/' . $this->request->controller . '/' . $this->request->action . ' is forbidden because the user mustn\'t be logged', __FILE__, __LINE__, ERROR_FATAL);
                        $url = Url::get($this->_configFirewall['default']['name'], $this->_configFirewall['default']['vars']);

                        if ($url != "") {
                            $this->response->header('Location:' . $url);
                        }
                        else {
                            $this->addError('The firewall failed to redirect the user to the url ' . $url, __FILE__, __LINE__, ERROR_FATAL);

                            return false;
                        }

                        return false;
                    }
                    break;
            }
        }
        else {
            $t = new Template($this->_configFirewall['csrf']['template'], 'gcsfirewall', 0);
            foreach ($this->_configFirewall['csrf']['variable'] as $val) {
                if ($val['type'] == 'var') {
                    $t->assign([$val['name'] => $val['value']]);
                }
                else {
                    $t->assign([$val['name'] => $this->useLang($val['value'])]);
                }
            }

            echo $t->show();
            $this->addError('The access to the page ' . $this->request->src . '/' . $this->request->controller . '/' . $this->request->action . ' is forbidden : CSRF error', __FILE__, __LINE__, ERROR_FATAL);

            return false;
        }

        return true;
    }
239547
public function isCmsApiRequest()
    {
        if (app()->runningInConsole() || ! $this->isCmsApiEnabled()) {
            return false;
        }

        return $this->requestRouteMatchesPrefix($this->getCmsApiRoutePrefix());
    }
967669
public function logout()
    {
        $result = false;
        if ($this->_socket) {
            try {
                $result = $this->requestAndResponse('LOGOUT', array(), true);
            } catch (Zend_Mail_Protocol_Exception $e) {
                // ignoring exception
            }
            fclose($this->_socket);
            $this->_socket = null;
        }
        return $result;
    }
925913
public function handleRequest(): self
    {
        if ($this->params->getBotParam('webhook.url')) {
            return $this->handleWebhook();
        }

        if ($loop_time = $this->getLoopTime()) {
            return $this->handleGetUpdatesLoop($loop_time, $this->getLoopInterval());
        }

        return $this->handleGetUpdates();
    }
1259374
public function send() : bool
    {
        if (headers_sent()) {
            return false;
        }

        header($this->getStartLine());

        foreach ($this->getHeaders() as $name => $values) {
            foreach ($values as $value) {
                header($name . ': ' . $value, false);
            }
        }

        echo (string) $this->body;

        flush();

        return true;
    }
932834
public function check(): bool
  {
    if ( $this->current !== null ){
      // if $on_error is set to E_CONTINUE returns true
      if ( $this->on_error === self::E_CONTINUE ){
        return true;
      }
      // If any connection has an error with mode E_STOP_ALL
      if ( self::$has_error_all && ($this->on_error !== self::E_STOP_ALL) ){
        return false;
      }
      // If this connection has an error with mode E_STOP
      if ( $this->has_error && ($this->on_error !== self::E_STOP) ){
        return false;
      }
      return true;
    }
    return false;
  }
694490
public function send()
    {
        if (php_sapi_name() == 'cli') {
            return true;
        }

        // We add of the X-Powered-By header when disable_x_powered_by is true
        if (!$this->disable_x_powered_by) {
            $this->response->addHeader('X-Powered-By', 'Bow Framework');
        }

        $this->prefix = '';

        $method = $this->request->method();

        // We verify the existence of a special method DELETE, PUT
        if ($method == 'POST') {
            if ($this->special_method !== null) {
                $method = $this->special_method;
            }
        }

        // We verify the existence of the method of the request in
        // the routing collection
        if (!isset($this->routes[$method])) {
            // We verify and call function associate by 404 code
            $this->response->status(404);

            if (empty($this->error_code)) {
                $this->response->send(
                    sprintf('Cannot %s %s 404', $method, $this->request->path())
                );
            }

            return false;
        }

        $response = null;

        $error = true;

        foreach ($this->routes[$method] as $key => $route) {
            // The route must be an instance of Route
            if (!($route instanceof Route)) {
                continue;
            }

            // We launch the search of the method that arrived in the query
             // then start checking the url of the request
            if (!$route->match($this->request->path())) {
                continue;
            }

            $this->current['path'] = $route->getPath();

            // We call the action associate with the route
            $response = $route->call();
            $error = false;

            break;
        }

        // Error management
        if (!$error) {
            return $this->sendResponse($response);
        }

        // We apply the 404 error code
        $this->response->status(404);

        if (array_key_exists(404, $this->error_code)) {
            $response = Actionner::execute($this->error_code[404], []);

            return $this->sendResponse($response);
        }

        if (is_string($this->config['view.404'])) {
            $response = $this->response->render($this->config['view.404']);

            return $this->sendResponse($response);
        }

        throw new RouterException(
            sprintf('La route "%s" n\'existe pas', $this->request->path()),
            E_ERROR
        );
    }
230218
public function processRequest()
    {
        if(!$this->canProcessRequest())
        {
            return false;
        }
        if(count($_FILES) > 0)
        {
            $this->readFromHttpData();
        }
        elseif(($this->sTempFile))
        {
            $this->readFromTempFile();
        }
        return true;
    }
1364249
public function init(): bool
    {
        $authHeader = $this->request->getHeader('Authorization');

        if (null === $authHeader) {
            $this->errorCode = self::ERR_NOAWSHEADER;

            return false;
        }
        $authHeader = explode(' ', $authHeader);

        if ('AWS' !== $authHeader[0] || !isset($authHeader[1])) {
            $this->errorCode = self::ERR_NOAWSHEADER;

            return false;
        }

        list($this->accessKey, $this->signature) = explode(':', $authHeader[1]);

        return true;
    }
385652
protected function client()
    {
        $handlerClass = $this->config('handlerClass');
        $level = $this->config('level');
        $stream = $this->config('stream');
        $log = new Logger($this->config('name'));
        $log->pushHandler(new $handlerClass($stream, $level));

        return $log;
    }
18594
public function send() :bool {

		// initialize
		$this->initializeCurl();
		$this->configureCurl();
		
		// run & parse
		return $this->parseCurl($this->executeCurl());
		
	}
625522
public function run()
    {
        try {
            $this->initWebSocketServer()->run();

            return true;
        } catch (Exception\Quit $e) {
            $this->getLogger()->success(
                $e->getMessage()
            );

            return true;
        } catch (\Exception $e) {
            $traces = array_reverse(explode(PHP_EOL, $e->getTraceAsString()));

            foreach ($traces as $key => $trace) {
                $trace = explode(' ', $trace, 2);

                $traces[$key] = sprintf(
                    '#%s > %s',
                    str_pad($key + 1, strlen(count($traces)), '0', STR_PAD_LEFT),
                    $trace[1]
                );
            }

            $this->getLogger()->error(
                "%s: %s\n%s",
                get_class($e),
                $e->getMessage(),
                implode("\n", $traces)
            );

            return false;
        }
    }
839943
def should_skip_logging(func):
    
    disabled = strtobool(request.headers.get("x-request-nolog", "false"))
    return disabled or getattr(func, SKIP_LOGGING, False)