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; }
public function from() { $this->sql['_from'] = " FROM " . Inflector::unCamelCase($this->orm->table) . " as " . $this->orm->alias; return $this; }