Пример #1
0
 public function __set($name, $value)
 {
     switch ($name) {
         case 'pipe':
             if ($value instanceof ymcPipe) {
                 $this->{$name} = $value;
             } else {
                 //@todo get Exception right
                 throw new ezcBaseValueException();
             }
             break;
         default:
             parent::__set($name, $value);
     }
 }
Пример #2
0
 public function activate(ymcPipeExecution $execution)
 {
     $state =& $this->activationState;
     if (!in_array($state, array(self::WAITING_FOR_ACTIVATION, self::WAITING_FOR_EXECUTION), TRUE)) {
         //@todo
         throw new Exception('Node can only be activated when in state WAITING FOR ACTIVATION resp. already in state WAITING FOR EXECUTION.');
     }
     $state = self::WAITING_FOR_EXECUTION;
     $execution->addActivatedNode($this);
 }