public function addRules($rules)
    {
        foreach ($rules as $rule) {
            $this->addrule($rule[0], $rule[1], $rule[2], isset($rule[3])?$rule[3]:null);
        }
    }
public function addRules($rules)
    {
        foreach ($rules as $rule) {
            $this->addrule($rule[0], $rule[1], $rule[2], isset($rule[3])?$rule[3]:null);
        }
    }
public function addRules ( $ rules ) { foreach ( $ rules as $ rule ) { $ this -> addrule ( $ rule [ 0 ] , $ rule [ 1 ] , $ rule [ 2 ] , isset ( $ rule [ 3 ] ) ? $ rule [ 3 ] : null ) ; } }
Add transition rules

array structure:
array( array(sourseState, input, targetState[, inputAction]),
array(sourseState, input, targetState[, inputAction]),
array(sourseState, input, targetState[, inputAction]),
...
)

@param array $rules
Add transition rules