Example #1
0
 /**
  * Factory
  */
 public function factory($values)
 {
     // Get the pages from the database
     $pages = Page::findAllByChapter($values['id']);
     $chapter = new self($values['number'], $values['name'], $pages);
     $chapter->setId($values['id']);
     return $chapter;
 }