$value) { $name = (string) $name; $method = 'set' . ucfirst($name); if (method_exists($this, $method)) { $this->{$method}($value); } else if ('_' !== $name[0]) { $this->{$name} = $value; } } return $this; } /** * Returns whether further event listeners should be triggered. * * @see Event::stopPropagation * @return bool Whether propagation was already stopped for this event. */ public function isPropagationStopped() { return $this->_propagationStopped; } /** * Stops the propagation of the event to further event listeners. * * If multiple event listeners are connected to the same event, no * further event listener will be triggered once any trigger calls * stopPropagation(). * * @return Qs_Event */ public function stopPropagation() { $this->_propagationStopped = true; return $this; } /** * Stores the EventDispatcher that dispatches this Event * * @param Qs_Event_Dispatcher $dispatcher * @return Qs_Event */ public function setDispatcher(Qs_Event_Dispatcher $dispatcher) { $this->_dispatcher = $dispatcher; return $this; } /** * Returns the EventDispatcher that dispatches this Event * * @return Qs_Event_Dispatcher */ public function getDispatcher() { return $this->_dispatcher; } /** * Gets the event's name. * * @return string * @return string */ public function getName() { return $this->_name; } /** * Sets the event's name. * * @param string $name The event name. * @return Qs_Event */ public function setName($name) { $this->_name = $name; return $this; } }