diff --git a/libraries/engine/Core.php b/libraries/engine/Core.php index 869d5cb..e451244 100644 --- a/libraries/engine/Core.php +++ b/libraries/engine/Core.php @@ -114,9 +114,9 @@ class Core // Init ORM if (defined('MONSTRA_DB_DSN')) { - ORM::configure(MONSTRA_DB_DSN); - ORM::configure('username', MONSTRA_DB_USER); - ORM::configure('password', MONSTRA_DB_PASSWORD); + Orm::configure(MONSTRA_DB_DSN); + Orm::configure('username', MONSTRA_DB_USER); + Orm::configure('password', MONSTRA_DB_PASSWORD); } // Auto cleanup if MONSTRA_DEBUG is true @@ -129,6 +129,12 @@ class Core if (count($namespaces = Dir::scan(CACHE)) > 0) foreach ($namespaces as $namespace) Dir::delete(CACHE . DS . $namespace); } + // Set cache dir + Cache::configure('cache_dir', CACHE); + + // Load URI module + require_once(ROOT . '/libraries/engine/Security.php'); + // Load URI module require_once(ROOT . '/libraries/engine/Uri.php'); diff --git a/libraries/monstra/Security.php b/libraries/engine/Security.php similarity index 100% rename from libraries/monstra/Security.php rename to libraries/engine/Security.php diff --git a/libraries/monstra/Cache.php b/libraries/monstra/Cache.php index 3aac59c..192c279 100644 --- a/libraries/monstra/Cache.php +++ b/libraries/monstra/Cache.php @@ -20,7 +20,7 @@ class Cache * * @var string */ - public static $cache_dir = CACHE; + public static $cache_dir = ''; /** * Cache file ext diff --git a/libraries/monstra/Config.php b/libraries/monstra/Config.php new file mode 100644 index 0000000..a69bf23 --- /dev/null +++ b/libraries/monstra/Config.php @@ -0,0 +1,85 @@ +