[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 namespace Fig\Link; 4 5 use Psr\Link\EvolvableLinkProviderInterface; 6 use Psr\Link\LinkInterface; 7 8 class GenericLinkProvider implements EvolvableLinkProviderInterface 9 { 10 use EvolvableLinkProviderTrait; 11 12 /** 13 * Constructs a new link provider. 14 * 15 * @param LinkInterface[] $links 16 * Optionally, specify an initial set of links for this provider. 17 * Note that the keys of the array will be ignored. 18 */ 19 public function __construct(array $links = []) 20 { 21 // This block will throw a type error if any item isn't a LinkInterface, by design. 22 array_filter($links, function (LinkInterface $item) { 23 return true; 24 }); 25 26 $hashes = array_map('spl_object_hash', $links); 27 $this->links = array_combine($hashes, $links); 28 } 29 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |