Exemplo n.º 1
0
 /**
  * Receive update from subject
  * @link http://php.net/manual/en/splobserver.update.php
  * @param \SplSubject $elevator <p>
  * The <b>SplSubject</b> notifying the observer of an update.
  * </p>
  * @return void
  * @since 5.1.0
  */
 public function update(\SplSubject $elevator)
 {
     if ($elevator instanceof Elevator) {
         if (-1 === $elevator->getFloor()) {
             if (null === $this->instructionPosition) {
                 $this->instructionPosition = $this->parser->getInstructionPosition();
             }
         }
     }
 }