You are here

public function StateMachine_State::__construct in State Machine 7.3

Same name and namespace in other branches
  1. 6 inc/base.inc \StateMachine_State::__construct()
  2. 7 inc/base.inc \StateMachine_State::__construct()
  3. 7.2 inc/base.inc \StateMachine_State::__construct()

Instantiate state.

Parameters

string $name: The machine readable name of the state.

StateMachine $machine: The related machine.

array $options: The options array.

File

inc/base.inc, line 268
Defines the base classes of the state machine.

Class

StateMachine_State
Base class for states.

Code

public function __construct($name, $machine, $options = array()) {
  $this->name = $name;
  $this->machine = $machine;
  $this->options = $options;
  $this->title = isset($this->options['title']) ? $this->options['title'] : $name;
}