public function __construct($controller, $name = null, $options = [])
{
$args = array_slice(func_get_args(), 1);
$name = array_key_exists(0, $args) && is_string($args[0]) ? array_shift($args) : null;
$lastArg = last($args);
if (is_array($lastArg)) {
$args = array_merge($args, array_extract_options($lastArg));
}
$options = $options ?: array_extract_options($args);
$this->controller = $controller;
$this->params = $controller->getParams();
$this->name = $name;
$this->options = $options;
}