コード例 #1
0
ファイル: Query.php プロジェクト: Djtec/HumbFramework
 protected function table($table = null)
 {
     $conf = Configure::read('Datasources.' . $this->orm->database);
     if ($table) {
         return Inflector::camelCase($conf['prefix'] . $table);
     } else {
         return Inflector::camelCase($conf['prefix'] . $this->orm->table);
     }
 }
コード例 #2
0
ファイル: Plugin.php プロジェクト: Djtec/HumbFramework
 public static function load($plugin, array $config = [])
 {
     if (is_array($plugin)) {
         foreach ($plugin as $name => $conf) {
             list($name, $conf) = is_numeric($name) ? [$conf, $config] : [$name, $conf];
             static::load($name, $conf);
         }
         return;
     }
     $config += ['name' => $plugin, 'classBase' => Inflector::camelCase($plugin), 'router' => strtolower($plugin), 'bootstrap' => false, 'routes' => false];
     self::$_plugins[$plugin] = $config;
 }