Add doc blocks to help IDE in FeedLinkGenerator.

This commit is contained in:
Benoît Burnichon
2015-05-07 12:22:31 +02:00
parent 79ddd6c54e
commit b805aba322
2 changed files with 17 additions and 12 deletions

View File

@@ -17,6 +17,7 @@ use Alchemy\Phrasea\Model\Entities\User;
class LinkGeneratorCollection implements LinkGeneratorInterface
{
/** @var LinkGeneratorInterface[] */
private $generators = [];
/**
@@ -61,6 +62,10 @@ class LinkGeneratorCollection implements LinkGeneratorInterface
return null !== $this->findGenerator($feed);
}
/**
* @param FeedInterface $feed
* @return LinkGeneratorInterface|null
*/
private function findGenerator(FeedInterface $feed)
{
foreach ($this->generators as $generator) {

View File

@@ -21,13 +21,13 @@ interface LinkGeneratorInterface
*
* @param FeedInterface $feed
* @param User $user
* @param type $format
* @param type $page
* @param type $renew
* @param string $format
* @param int $page
* @param bool $renew
*
* @return FeedLink
* @return FeedLinkInterface
*
* @throws InvalidArgumentException
* @throws \InvalidArgumentException
*/
public function generate(FeedInterface $feed, User $user, $format, $page = null, $renew = false);
@@ -35,21 +35,21 @@ interface LinkGeneratorInterface
* Generates a public FeedLink based on given FeedInterface.
*
* @param FeedInterface $feed
* @param type $format
* @param type $page
* @param string $format
* @param int $page
*
* @return FeedLink
* @return FeedLinkInterface
*
* @throws InvalidArgumentException
* @throws \InvalidArgumentException
*/
public function generatePublic(FeedInterface $feed, $format, $page = null);
/**
* Returns an instance of FeedInterface supported by the class.
* Returns whether an instance of FeedInterface is supported by the class.
*
* @param \Alchemy\Phrasea\Feed\FeedInterface $feed
* @param FeedInterface $feed
*
* @return FeedInterface
* @return bool
*/
public function supports(FeedInterface $feed);
}