| __construct($name, $type = self::TYPE_NORMAL, array $transitions = array(), array $properties = array()) | ||
| boolean |
isInitial()
Returns if this state is the initial state |
|
| mixed |
isFinal()
Returns if this state is the final state |
|
| mixed |
isNormal()
Returns if this state is a normal state (!($this->isInitial() || $this->isFinal()) |
|
| string |
getType()
Returns the state type |
|
| addTransition( $transition $transition) | ||
| setTransitions( array $transitions) | ||
| array |
getTransitions()
Returns the available transitions |
|
| boolean |
can( string| TransitionInterface $transition)
Returns if this state can run $transition |
|
| boolean | has( string $property) | |
| mixed | get( string $property, $default = null) | |
| mixed |
getProperties()
Returns optional state properties |
|
| string |
getName()
Returns the state name |
|
| setProperties( array $properties) | ||
| string | __toString() |
public
__construct($name, $type = self::TYPE_NORMAL, array $transitions = array(), array $properties = array())
| Parameters |
|
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
public boolean
isInitial()
Returns if this state is the initial state
| Return Value |
|
|---|
public mixed
isFinal()
Returns if this state is the final state
| Return Value |
|
|---|
public mixed
isNormal()
| Returns if this state is a normal state (!($this->isInitial() | $this->isFinal()) |
| Return Value |
|
|---|
public string
getType()
Returns the state type
| Return Value |
|
|---|
public
addTransition( $transition $transition)
| Parameters |
|
|||
|---|---|---|---|---|
public
setTransitions( array $transitions)
| Parameters |
|
|||
|---|---|---|---|---|
public array
getTransitions()
Returns the available transitions
| Return Value |
|
|---|
public boolean
can( string| TransitionInterface $transition)
Returns if this state can run $transition
| Parameters |
|
|||
|---|---|---|---|---|
| Return Value |
|
|||
public boolean
has( string $property)
| Parameters |
|
|||
|---|---|---|---|---|
| Return Value |
|
|||
public mixed
get( string $property, $default = null)
| Parameters |
|
||||||
|---|---|---|---|---|---|---|---|
| Return Value |
|
||||||
public mixed
getProperties()
Returns optional state properties
| Return Value |
|
|---|
public string
getName()
Returns the state name
| Return Value |
|
|---|
public
setProperties( array $properties)
| Parameters |
|
|||
|---|---|---|---|---|
public string
__toString()
| Return Value |
|
|---|