Exemplo n.º 1
0
 /**
  * This constructor initializes the class using the specified options.
  *
  * @access public
  * @param string $id                                        the id given to the state
  * @param \Unicity\Automaton\StateType $type                the type of state
  * @param mixed $value                                      the value associated with the state
  * @param mixed $constraint                                 a constraint on the state
  * @param double $priority                                  the priority given to the state
  */
 public function __construct($id, Automaton\StateType $type, $value = null, $constraint = null, $priority = 0.0)
 {
     $this->constraint = $constraint;
     $this->id = $id;
     $this->priority = $priority;
     $this->transitions = new Common\Mutable\HashSet();
     $this->type = $type !== null ? $type : Automaton\StateType::normal();
     $this->value = $value;
 }