public function __construct($name, $callable) { parent::__construct($name); if (!is_callable($callable)) { throw new InvalidArgumentException('Argument is not callable!'); } $this->callable = $callable; }