Overview

Namespaces

  • Mothership
    • Exception
      • StateMachine
    • StateMachine

Classes

  • StateMachineAbstract
  • Status
  • Transition
  • WorkflowAbstract

Interfaces

  • StateMachineInterface
  • StatusInterface
  • TransitionInterface
  • WorkflowInterface
  • Overview
  • Namespace
  • Class

Class Status

Mothership\StateMachine\Status implements Mothership\StateMachine\StatusInterface
Namespace: Mothership\StateMachine
Located at Mothership/StateMachine/Status.php
Methods summary
public
# __construct( Mothership\StateMachine\WorkflowInterface $workflow, array $properties = [] )
public mixed
# getName( )

Returns

mixed

Throws

Mothership\Exception\StateMachine\StatusException

Implementation of

Mothership\StateMachine\StatusInterface::getName()
public mixed
# getType( )

Returns

mixed

Throws

Mothership\Exception\StateMachine\StatusException

Implementation of

Mothership\StateMachine\StatusInterface::getType()
protected boolean
# isInitialType( )

Get if is an initial state

Get if is an initial state

Returns

boolean

Throws

Mothership\Exception\StateMachine\StatusException
public mixed
# getTransitions( )

Returns

mixed

Throws

Exception
Mothership\Exception\StateMachine\StatusException

Implementation of

Mothership\StateMachine\StatusInterface::getTransitions()
public boolean
# execute( $transition_name, Mothership\StateMachine\StatusInterface $current_status )

Parameters

$transition_name
$current_status

Returns

boolean

Throws

Mothership\Exception\StateMachine\StatusException

Implementation of

Mothership\StateMachine\StatusInterface::execute()
public boolean
# has( string $property )

Parameters

$property

Returns

boolean

Implementation of

Mothership\StateMachine\StatusInterface::has()
public mixed
# get( $property )

Parameters

$property

Returns

mixed

Throws

Mothership\Exception\StateMachine\StatusException

Implementation of

Mothership\StateMachine\StatusInterface::get()
public mixed
# getProperties( )

Returns optional state properties

Returns optional state properties

Returns

mixed

Implementation of

Mothership\StateMachine\StatusInterface::getProperties()
public Mothership\StateMachine\WorkflowInterface
# getWorkflow( )

Returns

Mothership\StateMachine\WorkflowInterface

Implementation of

Mothership\StateMachine\StatusInterface::getWorkflow()
public mixed
# setInternalStatus( $state )

Set the internal status, useful if the next step need a condition to be executed

Set the internal status, useful if the next step need a condition to be executed

Parameters

$state

Returns

mixed

Implementation of

Mothership\StateMachine\StatusInterface::setInternalStatus()
public mixed
# getInternalStatus( )

Get the internal status

Get the internal status

Returns

mixed
public
# hasInternalState( )
Properties summary
protected array $properties
#
protected array $types
# ['initial', 'normal', 'final']
protected $internalState
#
protected array $transitions
# array()
API documentation generated by ApiGen