MODPATH/mysqli/classes/Database/MySQLi.php [ 174 ]
169 {
170 // This benchmark is worthless
171 Profiler::delete($benchmark);
172 }
173
174 throw new Database_Exception(':error [ :query ]',
175 array(':error' => mysqli_error($this->_connection), ':query' => $sql),
176 mysqli_errno($this->_connection));
177 }
178
179 if (isset($benchmark))
-
MODPATH/database/classes/Kohana/Database/Query.php [ 251 ] » Database_MySQLi->query(arguments)
0
integer 1
1
string(425) "SELECT `brands`.*, `brands`.`name` as value FROM `products_categories` LEFT JOIN `products` ON `products`.`id` = `pr …"
2
string(11) "Model_Brand"
3
array(0)
246 return new Database_Result_Cached($result, $sql, $as_object, $object_params); 247 } 248 } 249 250 // Execute the query 251 $result = $db->query($this->_type, $sql, $as_object, $object_params); 252 253 if (isset($cache_key) AND $this->_lifetime > 0) 254 { 255 // Cache the result array 256 Kohana::cache($cache_key, $result->as_array(), $this->_lifetime);
-
APPPATH/classes/Model/Category.php [ 387 ] » Kohana_Database_Query->execute()
382 $sql = 'SELECT `brands`.*, `brands`.`name` as value FROM `products_categories` 383 LEFT JOIN `products` ON `products`.`id` = `products_categories`.`product_id` 384 LEFT JOIN `brands` on `products`.`brand_id` = `brands`.`id` 385 WHERE `category_id` IN :ids and `products`.`enabled` = \'1\' and `products`.`status` IN (1,2,3) 386 GROUP by `brands`.`id` ORDER BY `brands`.`name` ASC, `brands`.`sort` ASC'; 387 $result = DB::query(Database::SELECT, $sql)->param(':ids', $categories)->as_object('Model_Brand')->execute(); 388 //echo Debug::vars($result); 389 return $result; 390 } 391 392 public function getProductsFromCategories($categories) {
-
APPPATH/classes/Filter.php [ 39 ] » Model_Category->getBrandsFromCategories(arguments)
0
array(0)
34 $property_html_parts = array(); 35 $category = Model::factory('Category')->where('alias','=',$category_alias)->find(); 36 if( $category->is_b != '1'){ 37 $categories_list = Model::factory('Category')->getChildsRecurcive($category); 38 // Loading brands by existing products 39 $brands = Model::factory('Category')->getBrandsFromCategories($categories_list)->as_array('id','value'); 40 $brands_title = __('Бренд'); 41 $selected_brands = explode(':', Request::current()->query('brand')); 42 $property_html_parts[] = View::factory('filter/brand') 43 ->bind('name', $brands_title) 44 ->bind('values', $brands)
-
APPPATH/classes/Filter.php [ 7 ] » Filter::generate_filter()
2 3 class Filter extends Controller_Public { 4 5 public static function load(){ 6 7 $properties = self::generate_filter(); 8 $query = Request::current()->query(); 9 $category = Request::current()->param('category'); 10 $query_param = URL::query($query); 11 return View::factory('filter/index') 12 ->bind('query_param', $query_param)
-
APPPATH/classes/Controller/Catalog.php [ 84 ] » Filter::load()
79 'total_items' => $this->total_records, 80 'filter' => null, 81 )); 82 // 83 $this->template->rellinks = self::generate_rel_links($pagination); 84 $product_filter = Filter::load(); 85 $this->template->content = View::factory('index/catalog_page') 86 ->set('filter', $product_filter) 87 ->set('products', $products_view) 88 ->set('category_slice_catalog', $category_slice_catalog) 89 ->set('total_records', $this->total_records)
-
SYSPATH/classes/Kohana/Controller.php [ 84 ] » Controller_Catalog->action_index()
79 array(':uri' => $this->request->uri()) 80 )->request($this->request); 81 } 82 83 // Execute the action itself 84 $this->{$action}(); 85 86 // Execute the "after action" method 87 $this->after(); 88 89 // Return the response
-
{PHP internal call} » Kohana_Controller->execute()
-
SYSPATH/classes/Kohana/Request/Client/Internal.php [ 97 ] » ReflectionMethod->invoke(arguments)
0
object Controller_Catalog(10)
{ public item_on_page => integer 7 public current_page => integer 0 public total_records => integer 6 private category => object Model_Category(36)
{ public ids => array(0) public child_slice => NULL protected _has_many => array(2) ( "products" => array(4) ( "foreign_key" => string(11) "category_id" "through" => string(19) "products_categories" "model" => string(7) "Product" "far_key" => string(10) "product_id" ) "categories" => array(4) ( "foreign_key" => string(15) "parent_category" "through" => NULL "model" => string(8) "Category" "far_key" => string(2) "id" ) ) protected _has_one => array(0) protected _belongs_to => array(0) protected _load_with => array(0) protected _validation => NULL protected _object => array(11) ( "id" => string(4) "8412" "alias" => string(45) "noutbuki-kompyutery-programmy/monitory/iiyama" "name" => string(6) "Iiyama" "parent_category" => string(3) "328" "description" => string(2) """" "picture" => string(2) """" "picture_mini" => string(2) """" "is_b" => string(1) "0" "sort_order" => string(1) "0" "enabled" => string(1) "1" "total_products_count" => string(1) "6" ) protected _changed => array(0) protected _original_values => array(11) ( "id" => string(4) "8412" "alias" => string(45) "noutbuki-kompyutery-programmy/monitory/iiyama" "name" => string(6) "Iiyama" "parent_category" => string(3) "328" "description" => string(2) """" "picture" => string(2) """" "picture_mini" => string(2) """" "is_b" => string(1) "0" "sort_order" => string(1) "0" "enabled" => string(1) "1" "total_products_count" => string(1) "6" ) 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(8) "category" protected _object_plural => string(10) "categories" protected _table_name => string(10) "categories" protected _table_columns => array(11) ( "id" => array(13) ( "type" => string(3) "int" "min" => string(11) "-2147483648" "max" => string(10) "2147483647" "column_name" => string(2) "id" "column_default" => NULL "data_type" => string(3) "int" "is_nullable" => bool FALSE "ordinal_position" => integer 1 "display" => string(2) "11" "comment" => string(0) "" "extra" => string(0) "" "key" => string(3) "PRI" "privileges" => string(31) "select,insert,update,references" ) "alias" => array(12) ( "type" => string(6) "string" "column_name" => string(5) "alias" "column_default" => NULL "data_type" => string(7) "varchar" "is_nullable" => bool FALSE "ordinal_position" => integer 2 "character_maximum_length" => string(3) "255" "collation_name" => string(18) "utf8mb3_general_ci" "comment" => string(50) "Алиас для данной категории " "extra" => string(0) "" "key" => string(0) "" "privileges" => string(31) "select,insert,update,references" ) "name" => array(12) ( "type" => string(6) "string" "column_name" => string(4) "name" "column_default" => NULL "data_type" => string(7) "varchar" "is_nullable" => bool FALSE "ordinal_position" => integer 3 "character_maximum_length" => string(2) "50" "collation_name" => string(18) "utf8mb3_general_ci" "comment" => string(24) "Наименование" "extra" => string(0) "" "key" => string(0) "" "privileges" => string(31) "select,insert,update,references" ) "parent_category" => array(13) ( "type" => string(3) "int" "min" => string(11) "-2147483648" "max" => string(10) "2147483647" "column_name" => string(15) "parent_category" "column_default" => NULL "data_type" => string(3) "int" "is_nullable" => bool TRUE "ordinal_position" => integer 4 "display" => string(2) "11" "comment" => string(43) "Родительская категория" "extra" => string(0) "" "key" => string(0) "" "privileges" => string(31) "select,insert,update,references" ) "description" => array(12) ( "type" => string(6) "string" "character_maximum_length" => string(5) "65535" "column_name" => string(11) "description" "column_default" => string(4) "'""'" "data_type" => string(4) "text" "is_nullable" => bool FALSE "ordinal_position" => integer 5 "collation_name" => string(18) "utf8mb3_general_ci" "comment" => string(16) "Описание" "extra" => string(0) "" "key" => string(0) "" "privileges" => string(31) "select,insert,update,references" ) "picture" => array(12) ( "type" => string(6) "string" "column_name" => string(7) "picture" "column_default" => string(2) """" "data_type" => string(7) "varchar" "is_nullable" => bool FALSE "ordinal_position" => integer 6 "character_maximum_length" => string(2) "50" "collation_name" => string(18) "utf8mb3_general_ci" "comment" => string(42) "Картинка для категории" "extra" => string(0) "" "key" => string(0) "" "privileges" => string(31) "select,insert,update,references" ) "picture_mini" => array(12) ( "type" => string(6) "string" "column_name" => string(12) "picture_mini" "column_default" => string(2) """" "data_type" => string(7) "varchar" "is_nullable" => bool FALSE "ordinal_position" => integer 7 "character_maximum_length" => string(2) "50" "collation_name" => string(18) "utf8mb3_general_ci" "comment" => string(48) "Пиктограмма для категории" "extra" => string(0) "" "key" => string(0) "" "privileges" => string(31) "select,insert,update,references" ) "is_b" => array(12) ( "type" => string(6) "string" "column_name" => string(4) "is_b" "column_default" => string(1) "0" "data_type" => string(4) "enum" "is_nullable" => bool FALSE "ordinal_position" => integer 8 "collation_name" => string(18) "utf8mb3_general_ci" "options" => array(2) ( 0 => string(1) "0" 1 => string(1) "1" ) "comment" => string(31) "Является брендом" "extra" => string(0) "" "key" => string(0) "" "privileges" => string(31) "select,insert,update,references" ) "sort_order" => array(13) ( "type" => string(3) "int" "min" => string(11) "-2147483648" "max" => string(10) "2147483647" "column_name" => string(10) "sort_order" "column_default" => string(1) "0" "data_type" => string(3) "int" "is_nullable" => bool FALSE "ordinal_position" => integer 9 "display" => string(2) "11" "comment" => string(0) "" "extra" => string(0) "" "key" => string(0) "" "privileges" => string(31) "select,insert,update,references" ) "enabled" => array(12) ( "type" => string(6) "string" "column_name" => string(7) "enabled" "column_default" => string(1) "0" "data_type" => string(4) "enum" "is_nullable" => bool FALSE "ordinal_position" => integer 10 "collation_name" => string(18) "utf8mb3_general_ci" "options" => array(2) ( 0 => string(1) "0" 1 => string(1) "1" ) "comment" => string(0) "" "extra" => string(0) "" "key" => string(0) "" "privileges" => string(31) "select,insert,update,references" ) "total_products_count" => array(13) ( "type" => string(3) "int" "min" => string(11) "-2147483648" "max" => string(10) "2147483647" "column_name" => string(20) "total_products_count" "column_default" => string(1) "0" "data_type" => string(3) "int" "is_nullable" => bool FALSE "ordinal_position" => integer 11 "display" => string(2) "11" "comment" => string(64) "Число продукции в данной категории" "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(4) "8412" protected _table_names_plural => bool TRUE protected _reload_on_wakeup => bool TRUE protected _db => object Database_MySQLi(6)
private ids => NULL public params => array(3) ( "category" => string(45) "noutbuki-kompyutery-programmy/monitory/iiyama" "filter" => string(0) "" "page" => string(1) "1" ) public template => object View(2){ protected _connection_id => string(40) "52dcb747c1956ed56c1c645ddaa57774faac76b1" protected _identifier => string(1) "`" public last_query => string(495) "SELECT `category`.`id` AS `id`, `category`.`alias` AS `alias`, `category`.`name` AS `name`, `category`.`parent_category` AS `par …" 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(8) "category" }{ 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(5) ( "hostname" => string(9) "localhost" "database" => string(7) "kiparis" "port" => NULL "socket" => NULL "persistent" => bool FALSE ) "table_prefix" => string(0) "" "charset" => string(4) "utf8" "caching" => bool FALSE ) }{ protected _file => string(70) "/srv/http/virtualhosts/kiparis-crimea.ru/www/application/views/tpl.php" protected _data => array(10) ( "client_ip" => string(10) "172.18.0.1" "client_role" => string(6) "client" "title" => string(184) "Iiyama в Крыму. Купить iiyama в интернет-магазине в Феодосии. Продажа цифровой техники по доступным ценам. " "sub_title" => NULL "description" => string(8) "Iiyama. " "keywords" => string(91) "магазин компьютерной и бытовой техники, Феодосия" "header" => object Response(5)
public auto_render => bool TRUE public request => object Request(19){ protected _status => integer 200 protected _header => object HTTP_Header(0)
"rellinks" => string(86) "<link rel="canonical" href="/catalog/noutbuki-kompyutery-programmy/monitory/iiyama"/> " "content" => NULL "footer" => object Response(5){ }
protected _body => string(5845) "<div class="container hidden-xs"> <nav class="navbar navbar-default"> <ul class="nav navbar-nav navbar-right"> …" protected _cookies => array(0) protected _protocol => string(8) "HTTP/1.0" }{ protected _status => integer 200 protected _header => object HTTP_Header(0)
) }{ }
protected _body => string(9003) " <div class="container"> <div class="row"> <div class="col-md-9 copyright"> <div class="row"> …" protected _cookies => array(0) protected _protocol => string(8) "HTTP/1.0" }{ protected _requested_with => NULL protected _method => string(3) "GET" protected _protocol => string(8) "HTTP/1.0" protected _secure => bool FALSE protected _referrer => NULL protected _route => object Route(5)
public response => object Response(5){ protected _filters => array(0) protected _uri => string(52) "catalog(/<category>(/filter/<filter>)(/page:<page>))" protected _regex => array(3) ( "category" => string(15) "[a-zA-Z0-9\-/]+" "filter" => string(17) "[a-zA-Z0-9\-_=:]+" "page" => string(6) "[0-9]+" ) protected _defaults => array(5) ( "category" => NULL "filter" => string(0) "" "controller" => string(7) "Catalog" "action" => string(5) "Index" "page" => string(1) "1" ) protected _route_regex => string(117) "#^catalog(?:/(?P<category>[a-zA-Z0-9\-/]+)(?:/filter/(?P<filter>[a-zA-Z0-9\-_=:]+))?(?:/page:(?P<page>[0-9]+))?)?$#uD" }
protected _routes => array(0) protected _header => object HTTP_Header(0){ }
protected _body => NULL protected _directory => string(0) "" protected _controller => string(7) "Catalog" protected _action => string(5) "Index" protected _uri => string(53) "catalog/noutbuki-kompyutery-programmy/monitory/iiyama" protected _external => bool FALSE protected _params => array(3) ( "category" => string(45) "noutbuki-kompyutery-programmy/monitory/iiyama" "filter" => string(0) "" "page" => string(1) "1" ) 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.0" }92 93 // Create a new instance of the controller 94 $controller = $class->newInstance($request, $response); 95 96 // Run the controller's execute() method 97 $response = $class->getMethod('execute')->invoke($controller); 98 99 if ( ! $response instanceof Response) 100 { 101 // Controller failed to return a Response. 102 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.0" protected _secure => bool FALSE protected _referrer => NULL protected _route => object Route(5)
{ protected _filters => array(0) protected _uri => string(52) "catalog(/<category>(/filter/<filter>)(/page:<page>))" protected _regex => array(3) ( "category" => string(15) "[a-zA-Z0-9\-/]+" "filter" => string(17) "[a-zA-Z0-9\-_=:]+" "page" => string(6) "[0-9]+" ) protected _defaults => array(5) ( "category" => NULL "filter" => string(0) "" "controller" => string(7) "Catalog" "action" => string(5) "Index" "page" => string(1) "1" ) protected _route_regex => string(117) "#^catalog(?:/(?P<category>[a-zA-Z0-9\-/]+)(?:/filter/(?P<filter>[a-zA-Z0-9\-_=:]+))?(?:/page:(?P<page>[0-9]+))?)?$#uD" }
protected _routes => array(0) protected _header => object HTTP_Header(0){ }
protected _body => NULL protected _directory => string(0) "" protected _controller => string(7) "Catalog" protected _action => string(5) "Index" protected _uri => string(53) "catalog/noutbuki-kompyutery-programmy/monitory/iiyama" protected _external => bool FALSE protected _params => array(3) ( "category" => string(45) "noutbuki-kompyutery-programmy/monitory/iiyama" "filter" => string(0) "" "page" => string(1) "1" ) 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.0" }109 $orig_response = $response = Response::factory(array('_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 [ 997 ] » Kohana_Request_Client->execute(arguments)
0
object Request(19)
{ protected _requested_with => NULL protected _method => string(3) "GET" protected _protocol => string(8) "HTTP/1.0" protected _secure => bool FALSE protected _referrer => NULL protected _route => object Route(5)
{ protected _filters => array(0) protected _uri => string(52) "catalog(/<category>(/filter/<filter>)(/page:<page>))" protected _regex => array(3) ( "category" => string(15) "[a-zA-Z0-9\-/]+" "filter" => string(17) "[a-zA-Z0-9\-_=:]+" "page" => string(6) "[0-9]+" ) protected _defaults => array(5) ( "category" => NULL "filter" => string(0) "" "controller" => string(7) "Catalog" "action" => string(5) "Index" "page" => string(1) "1" ) protected _route_regex => string(117) "#^catalog(?:/(?P<category>[a-zA-Z0-9\-/]+)(?:/filter/(?P<filter>[a-zA-Z0-9\-_=:]+))?(?:/page:(?P<page>[0-9]+))?)?$#uD" }
protected _routes => array(0) protected _header => object HTTP_Header(0){ }
protected _body => NULL protected _directory => string(0) "" protected _controller => string(7) "Catalog" protected _action => string(5) "Index" protected _uri => string(53) "catalog/noutbuki-kompyutery-programmy/monitory/iiyama" protected _external => bool FALSE protected _params => array(3) ( "category" => string(45) "noutbuki-kompyutery-programmy/monitory/iiyama" "filter" => string(0) "" "page" => string(1) "1" ) 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) }
}992 throw new Request_Exception('Unable to execute :uri without a Kohana_Request_Client', array( 993 ':uri' => $this->_uri, 994 )); 995 } 996 997 return $this->_client->execute($this); 998 } 999 1000 /** 1001 * Returns whether this request is the initial request Kohana received. 1002 * Can be used to test for sub requests.
-
DOCROOT/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, array(), FALSE) 118 ->execute() 119 ->send_headers(TRUE) 120 ->body(); 121 }