Metabor\Statemachine\Util\SetupHelper::createEvent PHP Метод

createEvent() публичный Метод

public createEvent ( MetaborStd\Statemachine\StateInterface $sourceState, string $eventName ) : MetaborStd\Event\EventInterface
$sourceState MetaborStd\Statemachine\StateInterface
$eventName string
Результат MetaborStd\Event\EventInterface
    public function createEvent(StateInterface $sourceState, $eventName)
    {
        if ($sourceState instanceof State) {
            return $sourceState->getEvent($eventName);
        } else {
            throw new \InvalidArgumentException('Overwrite this method to implement a different type!');
        }
    }