lithium\core\Adaptable::_initAdapter()
Provides an extension point for modifying how adapters are instantiated.
Parameters
-
string
$class
The fully-namespaced class name of the adapter to instantiate.
-
array
$config
The configuration array to be passed to the adapter instance. See the
$config
parameter ofObject::__construct()
.
Returns
objectThe adapter's class.
Filter
This method can be filtered.
Source
protected static function _initAdapter($class, array $config) {
$params = compact('class', 'config');
return Filters::run(get_called_class(), __FUNCTION__, $params, function($params) {
return new $params['class']($params['config']);
});
}