public function __construct($callback, $flags = null) { if (null === $flags) { $flags = 0; } $this->flags = $flags; $this->enabled = true; $this->callback = $callback; $this->flags & self::NO_AUTO_REGISTER || $this->register(); }