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) {
return static::_filter(__FUNCTION__, compact('class', 'config'), function($self, $params) {
return new $params['class']($params['config']);
});
}