/** * @param object $object * @param string $method * @param TypeFactory $types * @param CommentParser $parser */ public function __construct($object, $method, TypeFactory $types, CommentParser $parser) { parent::__construct($object, $method, $types, $parser); $this->generic = new GenericAction($this); $this->generic->setCaption(parent::caption())->setDescription(parent::description())->setParameters(parent::parameters())->setModifying(parent::isModifying())->setExecute(function ($parameters) { return parent::execute($parameters); })->setFill(function ($parameters) { return $parameters; }); }
public function __construct($class, TypeFactory $types, CommentParser $parser, callable $execute) { parent::__construct($class, $types, $parser); $this->execute = $execute; $this->generic = new GenericAction($this); $this->generic->setCaption(parent::caption())->setDescription(parent::description())->setParameters(parent::parameters())->setExecute(function ($parameters) { return parent::execute($parameters); })->setFill(function ($parameters) { return $parameters; }); }