refactoring some classes.
This commit is contained in:
@@ -58,7 +58,6 @@ require SYS_PATH.'autoloader'.EXT;
|
|||||||
* request rather than parse the keys for every request.
|
* request rather than parse the keys for every request.
|
||||||
*/
|
*/
|
||||||
Config::load('application');
|
Config::load('application');
|
||||||
Config::load('container');
|
|
||||||
Config::load('session');
|
Config::load('session');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ class IoC {
|
|||||||
*/
|
*/
|
||||||
public static function bootstrap()
|
public static function bootstrap()
|
||||||
{
|
{
|
||||||
|
Config::load('container');
|
||||||
|
|
||||||
static::$container = new Container(Config::$items['container']);
|
static::$container = new Container(Config::$items['container']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ class URL {
|
|||||||
*/
|
*/
|
||||||
public static function to_route($name, $parameters = array(), $https = false)
|
public static function to_route($name, $parameters = array(), $https = false)
|
||||||
{
|
{
|
||||||
if ( ! is_null($route = IoC::container()->core('routing.router')->find($name)))
|
if ( ! is_null($route = IoC::core('routing.router')->find($name)))
|
||||||
{
|
{
|
||||||
$uris = explode(', ', key($route));
|
$uris = explode(', ', key($route));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user