/** * Constructs a data source or adapter object instance from a configuration array. * * @param array $config * @param array $paths * @return object */ protected static function _class($config, $paths = array()) { if (!$config['adapter']) { $config['adapter'] = $config['type']; } else { $paths = array_merge(array("adapter.data.source.{$config['type']}"), (array) $paths); } return parent::_class($config, $paths); }