Back to MVCFactory class

Method setDispatcherOnObject

private void
setDispatcherOnObject
(mixed $object)
Sets the internal event dispatcher on the given object.
Parameters
  • object $object The object
Returns
  • void
Since
  • 4.1.0
Class: MVCFactory
Project: Joomla

Method setDispatcherOnObject - Source code

/**
 * Sets the internal event dispatcher on the given object.
 *
 * @param   object  $object  The object
 *
 * @return  void
 *
 * @since   4.1.0
 */
private function setDispatcherOnObject($object)
{
    if (!$object instanceof DispatcherAwareInterface) {
        return;
    }
    try {
        $object->setDispatcher($this->getDispatcher());
    } catch (\UnexpectedValueException $e) {
        // Ignore it
    }
}