MODPATH/database/classes/kohana/database/mysql.php [ 67 ]
62 catch (Exception $e)
63 {
64 // No connection exists
65 $this->_connection = NULL;
66
67 throw new Database_Exception(':error',
68 array(':error' => $e->getMessage()),
69 $e->getCode());
70 }
71
72 // \xFF is a better delimiter, but the PHP driver uses underscore
-
MODPATH/database/classes/kohana/database/mysql.php [ 171 ] » Kohana_Database_MySQL->connect()
166 } 167 168 public function query($type, $sql, $as_object = FALSE, array $params = NULL) 169 { 170 // Make sure the database is connected 171 $this->_connection or $this->connect(); 172 173 if ( ! empty($this->_config['profiling'])) 174 { 175 // Benchmark this query for the current instance 176 $benchmark = Profiler::start("Database ({$this->_instance})", $sql);
-
MODPATH/database/classes/kohana/database/mysql.php [ 358 ] » Kohana_Database_MySQL->query(arguments)
0
integer 1
1
string(30) "SHOW FULL COLUMNS FROM `sites`"
2
bool FALSE
353 $result = $this->query(Database::SELECT, 'SHOW FULL COLUMNS FROM '.$table.' LIKE '.$this->quote($like), FALSE); 354 } 355 else 356 { 357 // Find all column names 358 $result = $this->query(Database::SELECT, 'SHOW FULL COLUMNS FROM '.$table, FALSE); 359 } 360 361 $count = 0; 362 $columns = array(); 363 foreach ($result as $row)
-
MODPATH/orm/classes/kohana/orm.php [ 1538 ] » Kohana_Database_MySQL->list_columns(arguments)
0
string(5) "sites"
1533 * @return array 1534 */ 1535 public function list_columns() 1536 { 1537 // Proxy to database 1538 return $this->_db->list_columns($this->_table_name); 1539 } 1540 1541 /** 1542 * Returns an ORM model for the given one-one related alias 1543 *
-
MODPATH/orm/classes/kohana/orm.php [ 392 ] » Kohana_ORM->list_columns()
387 $this->_table_columns = ORM::$_column_cache[$this->_object_name]; 388 } 389 else 390 { 391 // Grab column information from database 392 $this->_table_columns = $this->list_columns(); 393 394 // Load column cache 395 ORM::$_column_cache[$this->_object_name] = $this->_table_columns; 396 } 397 }
-
MODPATH/orm/classes/kohana/orm.php [ 337 ] » Kohana_ORM->reload_columns()
332 333 $this->_has_many[$alias] = array_merge($defaults, $details); 334 } 335 336 // Load column information 337 $this->reload_columns(); 338 339 // Clear initial model state 340 $this->clear(); 341 } 342
-
MODPATH/orm/classes/kohana/orm.php [ 246 ] » Kohana_ORM->_initialize()
241 * @param mixed $id Parameter for find or object to load 242 * @return void 243 */ 244 public function __construct($id = NULL) 245 { 246 $this->_initialize(); 247 248 if ($id !== NULL) 249 { 250 if (is_array($id)) 251 {
-
MODPATH/orm/classes/kohana/orm.php [ 37 ] » Kohana_ORM->__construct(arguments)
0
NULL
32 public static function factory($model, $id = NULL) 33 { 34 // Set class name 35 $model = 'Model_'.ucfirst($model); 36 37 return new $model($id); 38 } 39 40 /** 41 * "Has one" relationships 42 * @var array
-
APPPATH/bootstrap.php [ 130 ] » Kohana_ORM::factory(arguments)
0
string(4) "site"
125 126 // Determine current site and set Controller::$site. 127 // Get requested domain minus www prefix. 128 $domain = preg_replace('/^www\./', '', isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME']); 129 // Check if a site exists with mathing domain or domain_mobile fields. 130 Controller::$site = ORM::factory('site')->where((preg_match('/^m\./', $domain) ? 'domain_mobile' : 'domain'), 'LIKE', '%' . $domain . '%')->find(); 131 // If no match then try testDomain field. 132 if(! Controller::$site->id){ 133 // See if testDomain matches $dimain minus the m. prefix. 134 Controller::$site = ORM::factory('site')->where('testDomain', '=', preg_replace('/^m\./', '', $domain))->find(); 135 // if no match then add a www prefix and check testDomain field again.
-
{PHP internal call} » {closure}(arguments)
0
string(18) "RestaurantsAndPubs"
-
SYSPATH/classes/kohana/route.php [ 395 ] » call_user_func(arguments)
function_name
object Closure(1)
{ public 0 => object Closure(1) { *RECURSION* } }
parameters
string(18) "RestaurantsAndPubs"
390 public function matches($uri) 391 { 392 if ($this->_callback) 393 { 394 $closure = $this->_callback; 395 $params = call_user_func($closure, $uri); 396 397 if ( ! is_array($params)) 398 return FALSE; 399 } 400 else
-
SYSPATH/classes/kohana/request.php [ 582 ] » Kohana_Route->matches(arguments)
0
string(18) "RestaurantsAndPubs"
577 $params = NULL; 578 579 foreach ($routes as $name => $route) 580 { 581 // We found something suitable 582 if ($params = $route->matches($uri)) 583 { 584 return array( 585 'params' => $params, 586 'route' => $route, 587 );
-
SYSPATH/classes/kohana/request.php [ 800 ] » Kohana_Request::process_uri(arguments)
0
string(18) "RestaurantsAndPubs"
1
array(0)
795 if (Request::$initial === NULL OR strpos($uri, '://') === FALSE) 796 { 797 // Remove trailing slashes from the URI 798 $uri = trim($uri, '/'); 799 800 $processed_uri = Request::process_uri($uri, $this->_routes); 801 802 // Return here rather than throw exception. This will allow 803 // use of Request object even with unmatched route 804 if ($processed_uri === NULL) 805 {
-
SYSPATH/classes/kohana/request.php [ 208 ] » Kohana_Request->__construct(arguments)
0
string(19) "/RestaurantsAndPubs"
1
NULL
2
array(0)
203 } 204 } 205 } 206 207 // Create the instance singleton 208 Request::$initial = $request = new Request($uri, $cache, $injected_routes); 209 210 // Store global GET and POST data in the initial request only 211 $request->protocol($protocol) 212 ->query($_GET) 213 ->post($_POST);
-
DOCROOT/index.php [ 109 ] » Kohana_Request::factory()
104 105 /** 106 * Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO']. 107 * If no source is specified, the URI will be automatically detected. 108 */ 109 echo Request::factory() 110 ->execute() 111 ->send_headers(TRUE) 112 ->body();