2008-12-05 03:37:18 +02:00
|
|
|
<?php
|
2009-04-10 01:24:51 +03:00
|
|
|
|
2008-12-09 08:17:28 +02:00
|
|
|
/**
|
|
|
|
* The directory in which your application specific resources are located.
|
|
|
|
* The application directory must contain the config/kohana.php file.
|
2008-12-15 00:16:00 +02:00
|
|
|
*
|
2008-12-09 08:17:28 +02:00
|
|
|
* @see http://docs.kohanaphp.com/install#application
|
|
|
|
*/
|
2008-12-05 03:37:18 +02:00
|
|
|
$application = 'application';
|
|
|
|
|
2008-12-09 08:17:28 +02:00
|
|
|
/**
|
2008-12-15 00:16:00 +02:00
|
|
|
* The directory in which your modules are located.
|
|
|
|
*
|
|
|
|
* @see http://docs.kohanaphp.com/install#modules
|
2008-12-09 08:17:28 +02:00
|
|
|
*/
|
2008-12-05 03:37:18 +02:00
|
|
|
$modules = 'modules';
|
|
|
|
|
2008-12-09 08:17:28 +02:00
|
|
|
/**
|
2008-12-15 00:16:00 +02:00
|
|
|
* The directory in which the Kohana resources are located. The system
|
|
|
|
* directory must contain the classes/kohana.php file.
|
|
|
|
*
|
|
|
|
* @see http://docs.kohanaphp.com/install#system
|
2008-12-09 08:17:28 +02:00
|
|
|
*/
|
2008-12-15 00:16:00 +02:00
|
|
|
$system = 'system';
|
2008-12-05 03:37:18 +02:00
|
|
|
|
2008-12-09 08:17:28 +02:00
|
|
|
/**
|
|
|
|
* The default extension of resource files. If you change this, all resources
|
|
|
|
* must be renamed to use the new extension.
|
2008-12-15 00:16:00 +02:00
|
|
|
*
|
2008-12-09 08:17:28 +02:00
|
|
|
* @see http://docs.kohanaphp.com/install#ext
|
|
|
|
*/
|
2008-12-05 03:37:18 +02:00
|
|
|
define('EXT', '.php');
|
|
|
|
|
2009-05-21 20:43:09 +03:00
|
|
|
/**
|
|
|
|
* Set the PHP error reporting level. If you set this in php.ini, you remove this.
|
|
|
|
* @see http://php.net/error_reporting
|
|
|
|
*
|
|
|
|
* When developing your application, it is highly recommended to enable notices
|
|
|
|
* and strict warnings. Enable them by using: E_ALL | E_STRICT
|
|
|
|
*
|
|
|
|
* In a production environment, it is safe to ignore notices and strict warnings.
|
|
|
|
* Disable them by using: E_ALL ^ E_NOTICE
|
|
|
|
*/
|
|
|
|
error_reporting(E_ALL | E_STRICT);
|
|
|
|
|
2008-12-15 00:16:00 +02:00
|
|
|
/**
|
|
|
|
* End of standard configuration! Changing any of the code below should only be
|
|
|
|
* attempted by those with a working knowledge of Kohana internals.
|
|
|
|
*
|
|
|
|
* @see http://docs.kohanaphp.com/bootstrap
|
|
|
|
*/
|
2008-12-09 08:17:28 +02:00
|
|
|
|
2009-02-24 09:13:09 +02:00
|
|
|
// Set the full path to the docroot
|
|
|
|
define('DOCROOT', realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR);
|
|
|
|
|
|
|
|
// Make the application relative to the docroot
|
|
|
|
if ( ! is_dir($application) AND is_dir(DOCROOT.$application))
|
|
|
|
$application = DOCROOT.$application;
|
|
|
|
|
|
|
|
// Make the modules relative to the docroot
|
|
|
|
if ( ! is_dir($modules) AND is_dir(DOCROOT.$modules))
|
|
|
|
$modules = DOCROOT.$modules;
|
|
|
|
|
|
|
|
// Make the system relative to the docroot
|
|
|
|
if ( ! is_dir($system) AND is_dir(DOCROOT.$system))
|
2009-03-02 02:39:24 +02:00
|
|
|
$system = DOCROOT.$system;
|
2008-12-09 08:17:28 +02:00
|
|
|
|
|
|
|
// Define the absolute paths for configured directories
|
2009-02-24 09:13:09 +02:00
|
|
|
define('APPPATH', realpath($application).DIRECTORY_SEPARATOR);
|
|
|
|
define('MODPATH', realpath($modules).DIRECTORY_SEPARATOR);
|
|
|
|
define('SYSPATH', realpath($system).DIRECTORY_SEPARATOR);
|
2008-12-05 03:37:18 +02:00
|
|
|
|
2008-12-09 08:17:28 +02:00
|
|
|
// Clean up the configuration vars
|
2008-12-05 03:37:18 +02:00
|
|
|
unset($application, $modules, $system);
|
|
|
|
|
|
|
|
if (file_exists('install'.EXT))
|
|
|
|
{
|
2008-12-09 08:17:28 +02:00
|
|
|
// Load the installation check
|
2008-12-12 07:43:18 +02:00
|
|
|
return include 'install'.EXT;
|
2008-12-05 03:37:18 +02:00
|
|
|
}
|
2008-12-12 07:43:18 +02:00
|
|
|
|
2009-05-02 00:28:53 +03:00
|
|
|
// Define the start time of the application
|
|
|
|
define('KOHANA_START_TIME', microtime(TRUE));
|
|
|
|
|
2009-05-20 22:13:02 +03:00
|
|
|
// Load the base, low-level functions
|
|
|
|
require SYSPATH.'base'.EXT;
|
|
|
|
|
2009-05-02 00:28:53 +03:00
|
|
|
// Load the main Kohana class
|
|
|
|
require SYSPATH.'classes/kohana'.EXT;
|
|
|
|
|
2009-02-24 09:13:09 +02:00
|
|
|
// Bootstrap the application
|
2009-03-02 02:06:44 +02:00
|
|
|
require APPPATH.'bootstrap'.EXT;
|