PHP Класс SM\StateMachine\StateMachine

Наследование: implements SM\StateMachine\StateMachineInterface
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$callbackFactory SM\Callback\CallbackFactoryInterface
$config array
$dispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface
$object object

Открытые методы

Метод Описание
__construct ( object $object, array $config, Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher = null, SM\Callback\CallbackFactoryInterface $callbackFactory = null )
apply ( $transition, $soft = false ) {@inheritDoc}
can ( $transition ) {@inheritDoc}
getGraph ( ) {@inheritDoc}
getObject ( ) {@inheritDoc}
getPossibleTransitions ( ) {@inheritDoc}
getState ( ) {@inheritDoc}

Защищенные методы

Метод Описание
callCallbacks ( SM\Event\TransitionEvent $event, string $position ) : boolean Builds and calls the defined callbacks
setState ( string $state ) Set a new state to the underlying object

Описание методов

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

public __construct ( object $object, array $config, Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher = null, SM\Callback\CallbackFactoryInterface $callbackFactory = null )
$object object Underlying object for the state machine
$config array Config array of the graph
$dispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface EventDispatcher or null not to dispatch events
$callbackFactory SM\Callback\CallbackFactoryInterface CallbackFactory or null to use the default one

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

{@inheritDoc}
public apply ( $transition, $soft = false )

callCallbacks() защищенный Метод

Builds and calls the defined callbacks
protected callCallbacks ( SM\Event\TransitionEvent $event, string $position ) : boolean
$event SM\Event\TransitionEvent
$position string
Результат boolean

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

{@inheritDoc}
public can ( $transition )

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

{@inheritDoc}
public getGraph ( )

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

{@inheritDoc}
public getObject ( )

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

{@inheritDoc}

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

{@inheritDoc}
public getState ( )

setState() защищенный Метод

Set a new state to the underlying object
protected setState ( string $state )
$state string

Описание свойств

$callbackFactory защищенное свойство

protected CallbackFactoryInterface,SM\Callback $callbackFactory
Результат SM\Callback\CallbackFactoryInterface

$config защищенное свойство

protected array $config
Результат array

$dispatcher защищенное свойство

protected EventDispatcherInterface,Symfony\Component\EventDispatcher $dispatcher
Результат Symfony\Component\EventDispatcher\EventDispatcherInterface

$object защищенное свойство

protected object $object
Результат object