/** * @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); }
/** * Delete an author from the list of fan * * @param \Trismegiste\Socialist\AuthorInterface $auth */ public function removeFan(AuthorInterface $auth) { unset($this->fanList[$auth->getNickname()]); }
/** * {@inheritDoc} */ public function isEqual(AuthorInterface $other) { return $this->nickname === $other->getNickname(); }