/** * * Tells if the current page load appears to be the result of * an attempt to log out. * * @return bool * */ public function isLogoutRequest() { $method = strtolower($this->_config['source']); $process = $this->_request->{$method}($this->_config['source_process']); return !$this->_request->isCsrf() && $process == $this->_config['process_logout']; }
/** * * Executes the requested action and returns its output with layout. * * If an exception is thrown during the fetch() process, it is caught and * sent along to the _exceptionDuringFetch() method, which may generate * and return alternative output. * * @param string $spec The action specification string, for example, * "tags/php+framework" or "user/pmjones/php+framework?page=3" * * @return Solar_Http_Response A response object with headers and body * from the action, view, and layout. * */ public function fetch($spec = null) { try { // load action, info, and query properties $this->_load($spec); // prerun hook $this->_preRun(); // is this a csrf attempt? if ($this->_request->isCsrf()) { // looks like a forgery $this->_csrfAttempt(); } else { // action chain, with pre- and post-action hooks $this->_forward($this->_action, $this->_info); } // postrun hook $this->_postRun(); // render the view and layout, with pre- and post-render hooks $this->_render(); // done, return the response headers, cookies, and body return $this->_response; } catch (Exception $e) { // an exception was thrown somewhere, attempt to rescue it return $this->_exceptionDuringFetch($e); } }