public function wrap($name)
{
if (!isset($this->_definitions[$name])) {
throw new BoxException("Unexisting `{$name}` definition dependency.");
}
if (!$this->_definitions[$name]['definition'] instanceof Closure) {
throw new BoxException("Error `{$name}` is not a closure definition dependency can't be wrapped.");
}
$params = func_get_args();
array_shift($params);
$wrapper = $this->_classes['wrapper'];
return new $wrapper(['box' => $this, 'name' => $name, 'params' => $params]);
}