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); } }
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; }