Ejemplo n.º 1
0
 /**
  * Returns a ReplyBackState from a state.
  *
  * @param mixed $state
  * @return ReplyBackState
  */
 public static function FromState($state)
 {
     if (strpos($state, 'ReplyBackState') !== false) {
         return unserialize($state);
     } else {
         $s = new ReplyBackState();
         $s->SetICSState($state);
         $s->SetReplyBackState(array());
         return $s;
     }
 }
Ejemplo n.º 2
0
 /**
  * Reads and returns the current state.
  *
  * @access public
  * @return string
  */
 public function GetState()
 {
     $newState = $this->current->GetState();
     if ($this->isReplyBackExporter()) {
         $this->state->SetReplyBackState($newState);
     } else {
         $this->state->SetICSState($newState);
     }
     return ReplyBackState::ToState($this->state);
 }