diff --git a/application/config/constants.php b/application/config/constants.php index a5d16bf..7b68228 100644 --- a/application/config/constants.php +++ b/application/config/constants.php @@ -17,22 +17,22 @@ /** * Path for the helpers folder */ -define( 'HELPERS_PATH', APP_PATH . 'helpers/' ); +define( 'WP_BLADE_HELPERS_PATH', WP_BLADE_APP_PATH . 'helpers/' ); /** * Path for the models */ -define( 'MODELS_PATH', APP_PATH . 'models/' ); +define( 'WP_BLADE_MODELS_PATH', WP_BLADE_APP_PATH . 'models/' ); /** * Path for the controllers */ -define( 'CONTROLLERS_PATH', APP_PATH . 'controllers/' ); +define( 'WP_BLADE_CONTROLLERS_PATH', WP_BLADE_APP_PATH . 'controllers/' ); /** * Path for views */ -define( 'VIEWS_PATH', APP_PATH . 'views/' ); +define( 'WP_BLADE_VIEWS_PATH', WP_BLADE_APP_PATH . 'views/' ); /** * Storage path diff --git a/application/config/initialize.php b/application/config/initialize.php index f6f7bbd..ee250ec 100644 --- a/application/config/initialize.php +++ b/application/config/initialize.php @@ -33,7 +33,7 @@ $config = array( 'constants' ); foreach ( $config as $filename ) - require_once ( CONFIG_PATH . $filename . '.php' ); + require_once ( WP_BLADE_CONFIG_PATH . $filename . '.php' ); /* @@ -47,7 +47,7 @@ $libraries = array( 'laravel/blade', 'laravel/section', 'laravel/view', 'laravel/event' ); foreach ( $libraries as $filename ) - require_once( LIBRARIES_PATH . $filename . '.php' ); + require_once( WP_BLADE_LIBRARIES_PATH . $filename . '.php' ); /* @@ -62,7 +62,7 @@ $helpers = array( 'wp-blade', 'helpers' ); foreach ( $helpers as $filename ) - require_once( HELPERS_PATH . $filename . '.php' ); + require_once( WP_BLADE_HELPERS_PATH . $filename . '.php' ); /* @@ -78,7 +78,7 @@ $models = array( 'main-model' ); foreach ( $models as $filename ) - require_once ( MODELS_PATH . $filename . '.php' ); + require_once ( WP_BLADE_MODELS_PATH . $filename . '.php' ); /* |--------------------------------------------------------------------------- @@ -93,4 +93,4 @@ $controllers = array( 'main-controller' ); foreach ( $controllers as $filename ) - require_once ( CONTROLLERS_PATH . $filename . '.php' ); + require_once ( WP_BLADE_CONTROLLERS_PATH . $filename . '.php' ); diff --git a/application/controllers/main-controller.php b/application/controllers/main-controller.php index 09bb6aa..612a602 100644 --- a/application/controllers/main-controller.php +++ b/application/controllers/main-controller.php @@ -8,7 +8,7 @@ /** * Main controller */ -class Main_Controller { +class WP_Blade_Main_Controller { /** * Main model @@ -21,7 +21,7 @@ class Main_Controller { function __construct() { // Instantiate main model - $this->main_model = new Main_Model(); + $this->main_model = new WP_Blade_Main_Model(); // Globalize "blade_storage_path" $GLOBALS[ 'blade_storage_path' ] = BLADE_STORAGE_PATH; diff --git a/application/models/main-model.php b/application/models/main-model.php index 2b7d2e1..4e62612 100644 --- a/application/models/main-model.php +++ b/application/models/main-model.php @@ -8,7 +8,7 @@ /** * Main model */ -class Main_Model { +class WP_Blade_Main_Model { /** * Return a new class instance @@ -37,7 +37,7 @@ public function template_include_blade( $template ) { if( ! $template ) return $template; // Noting to do here. Come back later. - require_once( CONFIG_PATH . 'paths.php' ); + require_once( WP_BLADE_CONFIG_PATH . 'paths.php' ); Laravel\Blade::sharpen(); $view = Laravel\View::make( 'path: ' . $template, array() ); diff --git a/blade.php b/blade.php index f1ea7d0..46c8f7b 100644 --- a/blade.php +++ b/blade.php @@ -40,22 +40,22 @@ /** * Path for the application foler inside the theme */ -define( 'APP_PATH', WP_BLADE_ROOT . 'application/' ); +define( 'WP_BLADE_APP_PATH', WP_BLADE_ROOT . 'application/' ); /** * Path of assets */ -define( 'ASSETS_PATH', WP_BLADE_ROOT . 'assets/' ); +define( 'WP_BLADE_ASSETS_PATH', WP_BLADE_ROOT . 'assets/' ); /** * Path for the config folder */ -define( 'CONFIG_PATH', APP_PATH . 'config/' ); +define( 'WP_BLADE_CONFIG_PATH', WP_BLADE_APP_PATH . 'config/' ); /** * Path for libraries */ -define( 'LIBRARIES_PATH', APP_PATH . 'lib/' ); +define( 'WP_BLADE_LIBRARIES_PATH', WP_BLADE_APP_PATH . 'lib/' ); /* |------------------------------------------------------------------------- @@ -68,5 +68,5 @@ | After that, instanciate the main controller which will add actions and the like. */ -require_once ( CONFIG_PATH . '/initialize.php' ); -Main_Controller::make(); +require_once ( WP_BLADE_CONFIG_PATH . '/initialize.php' ); +WP_Blade_Main_Controller::make();