src/M6Web/Component/Redis/Manager.php
public function setEventDispatcher($eventDispatcher, $eventClass)
    {
        if (!is_object($eventDispatcher) || !method_exists($eventDispatcher, 'dispatch')) {
            throw new Exception("The EventDispatcher must be an object and implement a dispatch method");
        }

        if (!class_exists($eventClass) ||
            !method_exists($eventClass, 'setCommand') ||
            !method_exists($eventClass, 'setArguments') ||
            !method_exists($eventClass, 'setExecutionTime')
            ) {
            $msg = "The Event class : ".$eventClass." must implement the setCommand, ";
            $msg .= "setExecutionTime and the setArguments method";
            throw new Exception($msg);
        }
        $this->eventDispatcher = $eventDispatcher;
        $this->eventClass      = $eventClass;

        return $this;
    }
public function setEventDispatcher($eventDispatcher, $eventClass)
    {
        if (!is_object($eventDispatcher) || !method_exists($eventDispatcher, 'dispatch')) {
            throw new Exception("The EventDispatcher must be an object and implement a dispatch method");
        }

        if (!class_exists($eventClass) ||
            !method_exists($eventClass, 'setCommand') ||
            !method_exists($eventClass, 'setArguments') ||
            !method_exists($eventClass, 'setExecutionTime')
            ) {
            $msg = "The Event class : ".$eventClass." must implement the setCommand, ";
            $msg .= "setExecutionTime and the setArguments method";
            throw new Exception($msg);
        }
        $this->eventDispatcher = $eventDispatcher;
        $this->eventClass      = $eventClass;

        return $this;
    }
Set an event dispatcher to notify redis command
@param Object $eventDispatcher The eventDispatcher object, which implement the notify method
@param string $eventClass      The event class used to create an event and send it to the event dispatcher

@throws Exception
@return \M6Web\Component\Redis\Manager