SYSPATH/classes/Kohana/URL.php [ 127 ]
122 }
123
124 // Validate $host, see if it matches trusted hosts
125 if ( ! static::is_trusted_host($host))
126 {
127 throw new Kohana_Exception(
128 'Untrusted host :host. If you trust :host, add it to the trusted hosts in the `url` config file.',
129 [':host' => $host]
130 );
131 }
132
-
SYSPATH/classes/Kohana/URL.php [ 164 ] » Kohana_URL::base(arguments)
0
bool TRUE
1
bool FALSE
2
NULL
159 // Encode all non-ASCII characters, as per RFC 1738 160 $path = preg_replace_callback('~([^/#]+)~', 'URL::_rawurlencode_callback', $path); 161 } 162 163 // Concat the URL 164 return URL::base($protocol, $index, $subdomain).$path; 165 } 166 167 /** 168 * Callback used for encoding all non-ASCII characters, as per RFC 1738 169 * Used by URL::site()
-
SYSPATH/classes/Kohana/HTTP/Exception/Redirect.php [ 29 ] » Kohana_URL::site(arguments)
0
string(4) "/spb"
1
bool TRUE
2
bool FALSE
24 return $this->headers('Location'); 25 26 if (strpos($uri, '://') === FALSE) 27 { 28 // Make the URI into a URL 29 $uri = URL::site($uri, TRUE, ! empty(Kohana::$index_file)); 30 } 31 32 $this->headers('Location', $uri); 33 34 return $this;
-
SYSPATH/classes/Kohana/HTTP.php [ 40 ] » Kohana_HTTP_Exception_Redirect->location(arguments)
0
string(4) "/spb"
35 if ( ! $e instanceof HTTP_Exception_Redirect) 36 throw new Kohana_Exception('Invalid redirect code \':code\'', [ 37 ':code' => $code 38 ]); 39 40 throw $e->location($uri); 41 } 42 43 /** 44 * Checks the browser cache to see the response needs to be returned, 45 * execution will halt and a 304 Not Modified will be sent if the
-
SYSPATH/classes/Kohana/Controller.php [ 127 ] » Kohana_HTTP::redirect(arguments)
0
string(4) "/spb"
1
integer 302
122 * @param int $code HTTP Status code to use for the redirect 123 * @throws HTTP_Exception 124 */ 125 public static function redirect($uri = '', $code = 302) 126 { 127 return HTTP::redirect( (string) $uri, $code); 128 } 129 130 /** 131 * Checks the browser cache to see the response needs to be returned, 132 * execution will halt and a 304 Not Modified will be sent if the
-
APPPATH/classes/Controller/Base.php [ 79 ] » Kohana_Controller::redirect(arguments)
0
string(4) "/spb"
74 $this->page['city_current'] = ORM::factory("City")->where("id", "=", City::get())->find(); 75 76 $this->page['city_url'] = $city_url; 77 78 if( $city_url !== "page" && isset($this->request) && $this->request->detect_uri() == "") { 79 Controller::redirect("/" . $this->page['city_current']->alias); 80 } 81 82 if( $this->use_location ) { 83 if( $city_url !== "page" ) { 84 if($city_url != $this->page["city_current"]->alias) {
-
SYSPATH/classes/Kohana/Controller.php [ 69 ] » Controller_Base->before()
64 * @return Response 65 */ 66 public function execute() 67 { 68 // Execute the "before action" method 69 $this->before(); 70 71 // Determine the action to use 72 $action = 'action_'.$this->request->action(); 73 74 // If the action doesn't exist, it's a 404
-
{PHP internal call} » Kohana_Controller->execute()
-
SYSPATH/classes/Kohana/Request/Client/Internal.php [ 94 ] » ReflectionMethod->invoke(arguments)
0
object Controller_Menu(9)
{ public auto_render => bool TRUE public template => NULL public lang => string(2) "tr" public city_id => bool FALSE public use_location => bool TRUE public template_base => string(0) "" public page => array(3) ( "lang" => string(2) "tr" "city_current" => object Model_City(38)
{ public sortable => bool TRUE public can_delete => bool TRUE protected _has_one => array(0) protected _belongs_to => array(0) protected _has_many => array(0) protected _load_with => array(0) protected _validation => NULL protected _object => array(13) ( "id" => string(1) "1" "title_ru" => string(29) "Санкт-Петербург" "title_en" => string(16) "Saint-Petersburg" "title_tr" => string(16) "Saint-Petersburg" "alias" => string(3) "spb" "contacts" => string(760) "<p itemscope="" itemtype="http://schema.org/Organization"> <span itemprop="name">Санкт-Петербург,</span> …" "lat" => string(13) "59.9895851038" "lon" => string(13) "30.2047815800" "order" => string(1) "2" "deleted" => string(2) "no" "social_vk" => string(39) "http://vkontakte.ru/maximilian_brauhaus" "social_ok" => string(0) "" "social_ig" => string(40) "http://instagram.com/maximilian_brauhaus" ) protected _changed => array(0) protected _original_values => array(13) ( "id" => string(1) "1" "title_ru" => string(29) "Санкт-Петербург" "title_en" => string(16) "Saint-Petersburg" "title_tr" => string(16) "Saint-Petersburg" "alias" => string(3) "spb" "contacts" => string(760) "<p itemscope="" itemtype="http://schema.org/Organization"> <span itemprop="name">Санкт-Петербург,</span> …" "lat" => string(13) "59.9895851038" "lon" => string(13) "30.2047815800" "order" => string(1) "2" "deleted" => string(2) "no" "social_vk" => string(39) "http://vkontakte.ru/maximilian_brauhaus" "social_ok" => string(0) "" "social_ig" => string(40) "http://instagram.com/maximilian_brauhaus" ) protected _related => array(0) protected _valid => bool TRUE protected _loaded => bool TRUE protected _saved => bool FALSE protected _sorting => NULL protected _foreign_key_suffix => string(3) "_id" protected _object_name => string(4) "city" protected _object_plural => string(6) "cities" protected _table_name => string(6) "cities" protected _table_columns => array(13) ( "id" => array(13) ( "type" => string(3) "int" "min" => string(1) "0" "max" => string(10) "4294967295" "column_name" => string(2) "id" "column_default" => NULL "data_type" => string(12) "int unsigned" "is_nullable" => bool FALSE "ordinal_position" => integer 1 "display" => string(2) "11" "comment" => string(0) "" "extra" => string(14) "auto_increment" "key" => string(3) "PRI" "privileges" => string(31) "select,insert,update,references" ) "title_ru" => array(13) ( "type" => string(6) "string" "exact" => bool TRUE "column_name" => string(8) "title_ru" "column_default" => NULL "data_type" => string(4) "char" "is_nullable" => bool TRUE "ordinal_position" => integer 2 "character_maximum_length" => string(3) "200" "collation_name" => string(15) "utf8_general_ci" "comment" => string(0) "" "extra" => string(0) "" "key" => string(0) "" "privileges" => string(31) "select,insert,update,references" ) "title_en" => array(13) ( "type" => string(6) "string" "exact" => bool TRUE "column_name" => string(8) "title_en" "column_default" => NULL "data_type" => string(4) "char" "is_nullable" => bool TRUE "ordinal_position" => integer 3 "character_maximum_length" => string(3) "200" "collation_name" => string(15) "utf8_general_ci" "comment" => string(0) "" "extra" => string(0) "" "key" => string(0) "" "privileges" => string(31) "select,insert,update,references" ) "title_tr" => array(13) ( "type" => string(6) "string" "exact" => bool TRUE "column_name" => string(8) "title_tr" "column_default" => NULL "data_type" => string(4) "char" "is_nullable" => bool TRUE "ordinal_position" => integer 4 "character_maximum_length" => string(3) "200" "collation_name" => string(15) "utf8_general_ci" "comment" => string(0) "" "extra" => string(0) "" "key" => string(0) "" "privileges" => string(31) "select,insert,update,references" ) "alias" => array(13) ( "type" => string(6) "string" "exact" => bool TRUE "column_name" => string(5) "alias" "column_default" => NULL "data_type" => string(4) "char" "is_nullable" => bool TRUE "ordinal_position" => integer 5 "character_maximum_length" => string(2) "10" "collation_name" => string(15) "utf8_general_ci" "comment" => string(0) "" "extra" => string(0) "" "key" => string(0) "" "privileges" => string(31) "select,insert,update,references" ) "contacts" => array(12) ( "type" => string(6) "string" "character_maximum_length" => string(5) "65535" "column_name" => string(8) "contacts" "column_default" => NULL "data_type" => string(4) "text" "is_nullable" => bool TRUE "ordinal_position" => integer 6 "collation_name" => string(15) "utf8_general_ci" "comment" => string(0) "" "extra" => string(0) "" "key" => string(0) "" "privileges" => string(31) "select,insert,update,references" ) "lat" => array(13) ( "type" => string(6) "string" "exact" => bool TRUE "column_name" => string(3) "lat" "column_default" => NULL "data_type" => string(4) "char" "is_nullable" => bool TRUE "ordinal_position" => integer 7 "character_maximum_length" => string(3) "200" "collation_name" => string(15) "utf8_general_ci" "comment" => string(0) "" "extra" => string(0) "" "key" => string(0) "" "privileges" => string(31) "select,insert,update,references" ) "lon" => array(13) ( "type" => string(6) "string" "exact" => bool TRUE "column_name" => string(3) "lon" "column_default" => NULL "data_type" => string(4) "char" "is_nullable" => bool TRUE "ordinal_position" => integer 8 "character_maximum_length" => string(3) "200" "collation_name" => string(15) "utf8_general_ci" "comment" => string(0) "" "extra" => string(0) "" "key" => string(0) "" "privileges" => string(31) "select,insert,update,references" ) "order" => array(13) ( "type" => string(3) "int" "min" => string(11) "-2147483648" "max" => string(10) "2147483647" "column_name" => string(5) "order" "column_default" => NULL "data_type" => string(3) "int" "is_nullable" => bool TRUE "ordinal_position" => integer 9 "display" => string(2) "11" "comment" => string(0) "" "extra" => string(0) "" "key" => string(0) "" "privileges" => string(31) "select,insert,update,references" ) "deleted" => array(12) ( "type" => string(6) "string" "column_name" => string(7) "deleted" "column_default" => string(2) "no" "data_type" => string(4) "enum" "is_nullable" => bool TRUE "ordinal_position" => integer 10 "collation_name" => string(15) "utf8_general_ci" "options" => array(2) ( 0 => string(3) "yes" 1 => string(2) "no" ) "comment" => string(0) "" "extra" => string(0) "" "key" => string(0) "" "privileges" => string(31) "select,insert,update,references" ) "social_vk" => array(13) ( "type" => string(6) "string" "exact" => bool TRUE "column_name" => string(9) "social_vk" "column_default" => NULL "data_type" => string(4) "char" "is_nullable" => bool FALSE "ordinal_position" => integer 11 "character_maximum_length" => string(3) "200" "collation_name" => string(15) "utf8_general_ci" "comment" => string(0) "" "extra" => string(0) "" "key" => string(0) "" "privileges" => string(31) "select,insert,update,references" ) "social_ok" => array(13) ( "type" => string(6) "string" "exact" => bool TRUE "column_name" => string(9) "social_ok" "column_default" => NULL "data_type" => string(4) "char" "is_nullable" => bool FALSE "ordinal_position" => integer 12 "character_maximum_length" => string(3) "200" "collation_name" => string(15) "utf8_general_ci" "comment" => string(0) "" "extra" => string(0) "" "key" => string(0) "" "privileges" => string(31) "select,insert,update,references" ) "social_ig" => array(13) ( "type" => string(6) "string" "exact" => bool TRUE "column_name" => string(9) "social_ig" "column_default" => NULL "data_type" => string(4) "char" "is_nullable" => bool FALSE "ordinal_position" => integer 13 "character_maximum_length" => string(3) "200" "collation_name" => string(15) "utf8_general_ci" "comment" => string(0) "" "extra" => string(0) "" "key" => string(0) "" "privileges" => string(31) "select,insert,update,references" ) ) protected _updated_column => NULL protected _created_column => NULL protected _serialize_columns => array(0) protected _primary_key => string(2) "id" protected _primary_key_value => string(1) "1" protected _table_names_plural => bool TRUE protected _reload_on_wakeup => bool TRUE protected _db => object Database_MySQLi(6)
"city_url" => string(0) "" ) public request => object Request(19){ protected _connection_id => string(40) "d6fbf12135ff1d78ba06a85e4945f23fe57ce49a" protected _identifier => string(1) "`" public last_query => string(516) "SELECT `m_city`.`id` AS `id`, `m_city`.`title_ru` AS `title_ru`, `m_city`.`title_en` AS `title_en`, `m_city`.`title_tr` AS `titl …" protected _instance => string(7) "default" protected _connection => object mysqli(19)
protected _db_group => NULL protected _db_applied => array(0) protected _db_pending => array(0) protected _db_reset => bool TRUE protected _db_builder => NULL protected _with_applied => array(0) protected _cast_data => array(0) protected _errors_filename => string(4) "city" protected _behaviors => array(0) protected _private_columns => bool FALSE }{ public affected_rows => NULL public client_info => NULL public client_version => NULL public connect_errno => NULL public connect_error => NULL public errno => NULL public error => NULL public error_list => NULL public field_count => NULL public host_info => NULL public info => NULL public insert_id => NULL public server_info => NULL public server_version => NULL public stat => NULL public sqlstate => NULL public protocol_version => NULL public thread_id => NULL public warning_count => NULL }
protected _config => array(5) ( "type" => string(6) "MySQLi" "connection" => array(4) ( "hostname" => string(9) "localhost" "database" => string(7) "maxbeer" "persistent" => bool FALSE "ssl" => NULL ) "table_prefix" => string(2) "m_" "charset" => string(4) "utf8" "caching" => bool FALSE ) }{ protected _requested_with => NULL protected _method => string(3) "GET" protected _protocol => string(8) "HTTP/1.1" protected _secure => bool FALSE protected _referrer => NULL protected _route => object Route(5)
public response => object Response(5){ protected _filters => array(0) protected _uri => string(21) "(<city>/menu(/<url>))" protected _regex => array(0) protected _defaults => array(2) ( "controller" => string(4) "menu" "action" => string(5) "index" ) protected _route_regex => string(65) "#^(?:(?P<city>[^/.,;?\n]++)/menu(?:/(?P<url>[^/.,;?\n]++))?)?$#uD" }
protected _routes => array(0) protected _header => object HTTP_Header(0){ }
protected _body => NULL protected _directory => string(0) "" protected _controller => string(4) "Menu" protected _action => string(5) "index" protected _uri => string(0) "" protected _external => bool FALSE protected _params => array(0) protected _get => array(0) protected _post => array(0) protected _cookies => array(0) protected _client => object Request_Client_Internal(9){ protected _previous_environment => NULL protected _cache => NULL protected _follow => bool FALSE protected _follow_headers => array(1) ( 0 => string(13) "authorization" ) protected _strict_redirect => bool TRUE protected _header_callbacks => array(1) ( "Location" => string(34) "Request_Client::on_header_location" ) protected _max_callback_depth => integer 5 protected _callback_depth => integer 1 protected _callback_params => array(0) }
}{ protected _status => integer 200 protected _header => object HTTP_Header(0)
}{ }
protected _body => string(0) "" protected _cookies => array(0) protected _protocol => string(8) "HTTP/1.1" }89 90 // Create a new instance of the controller 91 $controller = $class->newInstance($request, $response); 92 93 // Run the controller's execute() method 94 $response = $class->getMethod('execute')->invoke($controller); 95 96 if ( ! $response instanceof Response) 97 { 98 // Controller failed to return a Response. 99 throw new Kohana_Exception('Controller failed to return a Response');
-
SYSPATH/classes/Kohana/Request/Client.php [ 114 ] » Kohana_Request_Client_Internal->execute_request(arguments)
0
object Request(19)
{ protected _requested_with => NULL protected _method => string(3) "GET" protected _protocol => string(8) "HTTP/1.1" protected _secure => bool FALSE protected _referrer => NULL protected _route => object Route(5)
{ protected _filters => array(0) protected _uri => string(21) "(<city>/menu(/<url>))" protected _regex => array(0) protected _defaults => array(2) ( "controller" => string(4) "menu" "action" => string(5) "index" ) protected _route_regex => string(65) "#^(?:(?P<city>[^/.,;?\n]++)/menu(?:/(?P<url>[^/.,;?\n]++))?)?$#uD" }
protected _routes => array(0) protected _header => object HTTP_Header(0){ }
protected _body => NULL protected _directory => string(0) "" protected _controller => string(4) "Menu" protected _action => string(5) "index" protected _uri => string(0) "" protected _external => bool FALSE protected _params => array(0) protected _get => array(0) protected _post => array(0) protected _cookies => array(0) protected _client => object Request_Client_Internal(9){ protected _previous_environment => NULL protected _cache => NULL protected _follow => bool FALSE protected _follow_headers => array(1) ( 0 => string(13) "authorization" ) protected _strict_redirect => bool TRUE protected _header_callbacks => array(1) ( "Location" => string(34) "Request_Client::on_header_location" ) protected _max_callback_depth => integer 5 protected _callback_depth => integer 1 protected _callback_params => array(0) }
}1
object Response(5)
{ protected _status => integer 200 protected _header => object HTTP_Header(0)
{ }
protected _body => string(0) "" protected _cookies => array(0) protected _protocol => string(8) "HTTP/1.1" }109 $orig_response = $response = Response::factory(['_protocol' => $request->protocol()]); 110 111 if (($cache = $this->cache()) instanceof HTTP_Cache) 112 return $cache->execute($this, $request, $response); 113 114 $response = $this->execute_request($request, $response); 115 116 // Execute response callbacks 117 foreach ($this->header_callbacks() as $header => $callback) 118 { 119 if ($response->headers($header))
-
SYSPATH/classes/Kohana/Request.php [ 1000 ] » Kohana_Request_Client->execute(arguments)
0
object Request(19)
{ protected _requested_with => NULL protected _method => string(3) "GET" protected _protocol => string(8) "HTTP/1.1" protected _secure => bool FALSE protected _referrer => NULL protected _route => object Route(5)
{ protected _filters => array(0) protected _uri => string(21) "(<city>/menu(/<url>))" protected _regex => array(0) protected _defaults => array(2) ( "controller" => string(4) "menu" "action" => string(5) "index" ) protected _route_regex => string(65) "#^(?:(?P<city>[^/.,;?\n]++)/menu(?:/(?P<url>[^/.,;?\n]++))?)?$#uD" }
protected _routes => array(0) protected _header => object HTTP_Header(0){ }
protected _body => NULL protected _directory => string(0) "" protected _controller => string(4) "Menu" protected _action => string(5) "index" protected _uri => string(0) "" protected _external => bool FALSE protected _params => array(0) protected _get => array(0) protected _post => array(0) protected _cookies => array(0) protected _client => object Request_Client_Internal(9){ protected _previous_environment => NULL protected _cache => NULL protected _follow => bool FALSE protected _follow_headers => array(1) ( 0 => string(13) "authorization" ) protected _strict_redirect => bool TRUE protected _header_callbacks => array(1) ( "Location" => string(34) "Request_Client::on_header_location" ) protected _max_callback_depth => integer 5 protected _callback_depth => integer 1 protected _callback_params => array(0) }
}995 throw new Request_Exception('Unable to execute :uri without a Kohana_Request_Client', [ 996 ':uri' => $this->_uri, 997 ]); 998 } 999 1000 return $this->_client->execute($this); 1001 } 1002 1003 /** 1004 * Returns whether this request is the initial request Kohana received. 1005 * Can be used to test for sub requests.
-
DOCROOT/public2/index.php [ 118 ] » Kohana_Request->execute()
113 /** 114 * Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO']. 115 * If no source is specified, the URI will be automatically detected. 116 */ 117 echo Request::factory(TRUE, [], FALSE) 118 ->execute() 119 ->send_headers(TRUE) 120 ->body(); 121 }