getConfig() final public method

Returns configuration variable. If no $key is passed, returns the entire array.
See also: self::__construct
final public getConfig ( $key = NULL, $default = NULL ) : mixed
return mixed
Ejemplo n.º 1
0
 /**
  * @return IAdapter
  */
 public function getAdapter()
 {
     if (!$this->adapter) {
         $driver = ucfirst(strtolower($this->connection->getConfig('driver')));
         switch ($driver) {
             case IAdapter::DRIVER_MYSQL:
             case IAdapter::DRIVER_MYSQLI:
                 $class = 'Joseki\\Migration\\Database\\Adapters\\MysqlAdapter';
                 break;
             case IAdapter::DRIVER_SQLSRV:
                 $class = 'Joseki\\Migration\\Database\\Adapters\\SqlsrvAdapter';
                 break;
             default:
                 // fallback
                 $class = self::$defaultAdapter;
                 break;
         }
         $this->adapter = new $class($this->connection, $this->table);
     }
     return $this->adapter;
 }