protected function setupPaths() { $basePath = str_finish(get_template_directory(), '/'); $controllersDirectory = $basePath . 'controllers'; $modelsDirectory = $basePath . 'models'; Illuminate\Support\ClassLoader::register(); Illuminate\Support\ClassLoader::addDirectories(array($controllersDirectory, $modelsDirectory)); }
/** * Create new instance of Bootioc */ public function __construct() { //Register class loader Illuminate\Support\ClassLoader::register(); //Create the IOC container $this->ioc = new Container(); $this->ioc->bind('app', $this->ioc); Illuminate\Support\Facades\Facade::setFacadeApplication($this->ioc); //Execute TRegister $this->registerRepositories(); //Add facades to classes $this->addFacades(); }
| | The Patchwork library provides solid handling of UTF-8 strings as well | as provides replacements for all mb_* and iconv type functions that | are not available by default in PHP. We'll setup this stuff here. | */ Patchwork\Utf8\Bootup::initMbstring(); /* |-------------------------------------------------------------------------- | Register The Laravel Auto Loader |-------------------------------------------------------------------------- | | We register an auto-loader "behind" the Composer loader that can load | model classes on the fly, even if the autoload files have not been | regenerated for the application. We'll add it to the stack here. | */ Illuminate\Support\ClassLoader::register(); /* |-------------------------------------------------------------------------- | Register The Workbench Loaders |-------------------------------------------------------------------------- | | The Laravel workbench provides a convenient place to develop packages | when working locally. However we will need to load in the Composer | auto-load files for the packages so that these can be used here. | */ if (is_dir($workbench = __DIR__ . '/../workbench')) { Illuminate\Workbench\Starter::start($workbench); }