| 1 | <?php |
||
| 9 | class RelatedItemsList implements RelatedItemsListInterface |
||
| 10 | { |
||
| 11 | /** @var RelatedItemInterface[] */ |
||
| 12 | protected $relatedItems = []; |
||
| 13 | |||
| 14 | protected $infinity; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Add channel |
||
| 18 | * @param bool $infinity Use or not infinity scroll of related items |
||
| 19 | * @return void |
||
|
|
|||
| 20 | */ |
||
| 21 | 21 | public function __construct(bool $infinity = false) |
|
| 25 | |||
| 26 | 3 | public function appendTo(ItemInterface $item): RelatedItemsListInterface |
|
| 31 | |||
| 32 | 9 | public function addItem(RelatedItem $relatedItem): RelatedItemsListInterface |
|
| 37 | |||
| 38 | 12 | public function asXML(): SimpleXMLElement |
|
| 54 | } |
||
| 55 |
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.