Esempio n. 1
0
 /**
  * @return Collection
  */
 public function posts()
 {
     $author = new Author('*****@*****.**', '12345678', 'AUTOR_DE_PLATZI');
     $author->setName('Guido', 'Woda');
     return new Collection([1 => new Post($author, 'Post #1', 'This is the first post'), 2 => new Post($author, 'Post #2', 'This is the second post'), 3 => new Post($author, 'Post #3', 'This is the third post'), 4 => new Post($author, 'Post #4', 'This is the fourth post'), 5 => new Post($author, 'Post #5', 'This is the fifth post')]);
 }
Esempio n. 2
0
 protected function mapEntity(array $result)
 {
     $author = new Author($result['email'], $result['password'], 'AUTOR_DE_PLATZI');
     $author->setName($result['first_name'], $result['last_name']);
     return $author;
 }