Ejemplo n.º 1
0
 public function change(BookColleague $bookColleague)
 {
     if ($bookColleague instanceof BookTitleColleague) {
         switch ($bookColleague->getState()) {
             case 'upper':
                 if ($this->getAuthor()->getState() != 'upper') {
                     $this->getAuthor()->setAuthorUpperCase();
                 }
                 break;
             case 'lower':
                 if ($this->getAuthor()->getState() != 'lower') {
                     $this->getAuthor()->setAuthorLowerCase();
                 }
                 break;
         }
     } elseif ($bookColleague instanceof BookAuthorColleague) {
         switch ($bookColleague->getState()) {
             case 'upper':
                 if ($this->getTitle()->getState() != 'upper') {
                     $this->getTitle()->setTitleUpperCase();
                 }
                 break;
             case 'lower':
                 if ($this->getTitle()->getState() != 'lower') {
                     $this->getTitle()->setTitleLowerCase();
                 }
                 break;
         }
     }
 }
 public function __construct($author, $mediator)
 {
     $this->author = $author;
     parent::__construct($mediator);
 }
Ejemplo n.º 3
0
 function __construct($title_in, $mediator_in)
 {
     $this->title = $title_in;
     parent::__construct($mediator_in);
 }
Ejemplo n.º 4
0
 public function __construct($title, $mediator)
 {
     $this->title = $title;
     parent::__construct($mediator);
 }