Example #1
0
 /**
  * @param AuthorInterface $author
  *
  * @return Author
  */
 public static function fromObject(AuthorInterface $author)
 {
     return new self($author->getId(), get_class($author));
 }
 public function cancelReport(AuthorInterface $author)
 {
     unset($this->abusive[$author->getNickname()]);
     $this->abusiveCount = count($this->abusive);
 }
Example #3
0
 /**
  * Delete an author from the list of fan
  *
  * @param \Trismegiste\Socialist\AuthorInterface $auth
  */
 public function removeFan(AuthorInterface $auth)
 {
     unset($this->fanList[$auth->getNickname()]);
 }
Example #4
0
 /**
  * {@inheritDoc}
  */
 public function isEqual(AuthorInterface $other)
 {
     return $this->nickname === $other->getNickname();
 }