* * @return mixed */ private function prepare($data) { //Returns array if ('array' == $this->format) { $result = is_array($data) ? $data : json_decode($data, 1); // If error exists, throw Exception if ($this->throwErrors and $result['errors']) { throw new \Exception(is_array($result['errors']) ? implode("\n", $result['errors']) : $result['errors']); } return $result; } // Returns json or xml document return $data; }
/** * Handles & reports fatal PHP errors that are causing the shutdown */ public function handleFatalError() { \Rollbar::report_fatal_error(); parent::handleFatalError(); } }
$_GET = [ 'categoryAlias' => 'polotencesushiteli', 'cityAlias' => 'vladimir-volynskiy', ]; $_SESSION = [ '__flash' => [], ];