예제 #1
0
파일: Module.php 프로젝트: crapougnax/t41
 public static function bind(array $config, $path, Layout\Menu $menu = null)
 {
     $store = $config['enabled'] == true ? 'enabled' : 'disabled';
     if ($store == 'disabled') {
         return;
     }
     Config::addPath($path . '/configs/', Config::REALM_CONFIGS);
     // if modules has model, declare path to the autoloader
     if (is_dir($path . '/models') && isset($config['namespace'])) {
         Core::addAutoloaderPrefix($config['namespace'], $path . '/models/');
         Config::addPath($path . '/models', Config::REALM_OBJECTS, null, $config['namespace']);
     }
     // Register views directory if it exists
     if (is_dir($path . '/views')) {
         //	Config::addPath($path . '/views', Config::REALM_TEMPLATES, Config::POSITION_TOP);
     }
 }