mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 06:53:15 +00:00
Add doc blocks to help IDE in FeedLinkGenerator.
This commit is contained in:
@@ -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) {
|
||||
|
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user