lithium\core\Adaptable::_initAdapter PHP Метод

_initAdapter() защищенный статический Метод

Provides an extension point for modifying how adapters are instantiated.
См. также: lithium\core\Object::__construct()
protected static _initAdapter ( string $class, array $config ) : object
$class string The fully-namespaced class name of the adapter to instantiate.
$config array The configuration array to be passed to the adapter instance. See the `$config` parameter of `Object::__construct()`.
Результат object The adapter's class.
    protected static function _initAdapter($class, array $config)
    {
        return static::_filter(__FUNCTION__, compact('class', 'config'), function ($self, $params) {
            return new $params['class']($params['config']);
        });
    }