/** * Constructor. * * @param ObjectConfig $config Configuration options */ public function __construct(ObjectConfig $config) { parent::__construct($config); foreach ($this->getMethods() as $method) { if (substr($method, 0, 7) == '_action') { $this->__actions[] = strtolower(substr($method, 7)); } } }
/** * Object constructor * * @param ObjectConfig $config Configuration options * @throws \InvalidArgumentException */ public function __construct(ObjectConfig $config) { parent::__construct($config); if (is_null($config->event_publisher)) { throw new \InvalidArgumentException('event_publisher [EventPublisherInterface] config option is required'); } //Set the event dispatcher $this->__event_publisher = $config->event_publisher; //Set the immutable state of the handler $this->_event_immutable = $config->event_immutable; }