示例#1
0
 protected function init()
 {
     parent::init();
     $this->behavior(new Event(Event::CHANGE));
     $this->behavior(new Event(Event::ACTIVATED));
     $this->behavior(new Event(Event::COMPLETE));
     $this->behavior(new Event(Event::SUCCESS));
     $this->behavior(new Event(Event::FAILURE));
     $this->behavior(new State(State::DRAFT));
     $this->behavior(new State(State::DONE));
     $this->behavior(new State(State::NORMAL));
     $this->behavior(new State(State::READONLY));
     $this->behavior(new State(State::BUSY));
     $this->behavior(new Action(Action::ACTIVATE));
     $this->behavior(new Action(Action::UPDATE));
 }
示例#2
0
 protected function init()
 {
     parent::init();
     $this->behavior(Event::COMPLETE, array($this, 'deliver'));
     // $this->halt( State::DRAFT );
 }
示例#3
0
 public function __construct()
 {
     parent::__construct();
     $this->_registrations = array();
     $this->scope = $this;
 }