Metabor\Observer\Subject::__construct PHP 메소드

__construct() 공개 메소드

public __construct ( )
    public function __construct()
    {
        $this->observers = new \SplObjectStorage();
    }

Usage Example

예제 #1
0
 /**
  * @param object           $subject
  * @param ProcessInterface $process
  * @param string           $stateName
  */
 public function __construct($subject, ProcessInterface $process, $stateName = null, TransitionSelectorInterface $transitonSelector = null)
 {
     parent::__construct();
     $this->subject = $subject;
     if ($stateName) {
         $this->currentState = $process->getState($stateName);
     } else {
         $this->currentState = $process->getInitialState();
     }
     if ($transitonSelector) {
         $this->transitonSelector = $transitonSelector;
     } else {
         $this->transitonSelector = new OneOrNoneActiveTransition();
     }
 }
All Usage Examples Of Metabor\Observer\Subject::__construct