MODPATH/database/classes/Kohana/Database/MySQLi.php [ 147 ]
142 $status = $this->_connection->set_charset($charset);
143 }
144
145 if ($status === FALSE)
146 {
147 throw new Database_Exception(':error', [':error' => $this->_connection->error], $this->_connection->errno);
148 }
149 }
150
151 public function query($type, $sql, $as_object = FALSE, array $params = NULL)
152 {
-
MODPATH/database/classes/Kohana/Database/MySQLi.php [ 84 ]
79 $this->_connection_id = sha1($hostname.'_'.$username.'_'.$password); 80 81 if ( ! empty($this->_config['charset'])) 82 { 83 // Set the character set 84 $this->set_charset($this->_config['charset']); 85 } 86 87 if ( ! empty($this->_config['connection']['variables'])) 88 { 89 // Set session variables
-
MODPATH/database/classes/Kohana/Database/MySQLi.php [ 408 ]
403 } 404 405 public function escape($value) 406 { 407 // Make sure the database is connected 408 $this->_connection or $this->connect(); 409 410 if (($value = $this->_connection->real_escape_string( (string) $value)) === FALSE) 411 { 412 throw new Database_Exception(':error', [ 413 ':error' => $this->_connection->error,
-
MODPATH/database/classes/Kohana/Database.php [ 477 ]
472 { 473 // Convert to non-locale aware float to prevent possible commas 474 return sprintf('%F', $value); 475 } 476 477 return $this->escape($value); 478 } 479 480 /** 481 * Quote a database column name and add the table prefix if needed. 482 *
-
MODPATH/database/classes/Kohana/Database/Query/Builder.php [ 120 ]
115 $value = '(NULL)'; 116 } 117 elseif ((is_string($value) AND array_key_exists($value, $this->_parameters)) === FALSE) 118 { 119 // Quote the value, it is not a parameter 120 $value = $db->quote($value); 121 } 122 123 if ($column) 124 { 125 if (is_array($column))
-
MODPATH/database/classes/Kohana/Database/Query/Builder/Select.php [ 372 ]
367 } 368 369 if ( ! empty($this->_where)) 370 { 371 // Add selection conditions 372 $query .= ' WHERE '.$this->_compile_conditions($db, $this->_where); 373 } 374 375 if ( ! empty($this->_group_by)) 376 { 377 // Add grouping
-
MODPATH/database/classes/Kohana/Database/Query.php [ 234 ]
229 { 230 $object_params = $this->_object_params; 231 } 232 233 // Compile the SQL query 234 $sql = $this->compile($db); 235 236 if ($this->_lifetime !== NULL AND $this->_type === Database::SELECT) 237 { 238 // Set the cache key based on the database instance name and SQL 239 $cache_key = 'Database::query("'.$db.'", "'.$sql.'")';
-
MODPATH/orm/classes/Kohana/ORM.php [ 1221 ]
1216 return $result; 1217 } 1218 else 1219 { 1220 // Load the result as an associative array 1221 $result = $this->_db_builder->as_assoc()->execute($this->_db); 1222 1223 $this->reset(); 1224 1225 if ($result->count() === 1) 1226 {
-
MODPATH/orm/classes/Kohana/ORM.php [ 1128 ]
1123 } 1124 } 1125 1126 $this->_build(Database::SELECT); 1127 1128 return $this->_load_result(FALSE); 1129 } 1130 1131 /** 1132 * Finds multiple database rows and returns an iterator of the rows found. 1133 *
-
MODPATH/esup/classes/Model/Esup/Common/Language.php [ 44 ]
39 ]; 40 41 public function get_instance($key) 42 { 43 $_language = $this->where('key', '=', $key) 44 ->find(); 45 46 if ($_language->loaded()) 47 { 48 $this->_lang = $_language->key; 49 $this->_postfix = '_' . $_language->key;
-
APPPATH/classes/Controller/Common.php [ 32 ]
27 /* Get session instance */ 28 $this->session = Session::instance(); 29 30 /** @var Model_Esup_Common_Language $_lang_instance */ 31 $_lang_instance = ORM::factory('Esup_Common_Language') 32 ->get_instance($this->request->param('lang')); 33 34 $this->lang = $_lang_instance->get_lang(); 35 $this->postfix = $_lang_instance->get_postfix(); 36 $this->languages = $_lang_instance->get_active(); 37
-
APPPATH/classes/Controller/Shop/Common.php [ 24 ]
19 */ 20 protected $_user; 21 22 public function before() 23 { 24 parent::before(); 25 26 /* Get user auth id */ 27 $auth_id = Cookie::get('auth_id'); 28 29 $this->_user = ORM::factory('User')
-
SYSPATH/classes/Kohana/Controller.php [ 69 ]
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}
-
SYSPATH/classes/Kohana/Request/Client/Internal.php [ 94 ]
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 ]
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 ]
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.
-
/var/www/vhosts/climatsystems.kz/clim-vent.kz/public/index.php [ 138 ]
133 /** 134 * Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO']. 135 * If no source is specified, the URI will be automatically detected. 136 */ 137 echo Request::factory(TRUE, [], FALSE) 138 ->execute() 139 ->send_headers(TRUE) 140 ->body(); 141 }