◆ __construct()
__construct |
( |
string |
$rel = null , |
|
|
string |
$href = '' |
|
) |
| |
◆ getAttributes()
{Returns a list of attributes that describe the target URI.
- Renvoie
- array A key-value list of attributes, where the key is a string and the value is either a PHP primitive or an array of PHP strings. If no values are found an empty array MUST be returned.
}
Implémente LinkInterface.
Références Link\$attributes.
◆ getHref()
{Returns the target of the link.The target link must be one of:
- An absolute URI, as defined by RFC 5988.
- A relative URI, as defined by RFC 5988. The base of the relative link is assumed to be known based on context by the client.
- A URI template as defined by RFC 6570.
If a URI template is returned,
isTemplated() MUST return True.
- Renvoie
- string
}
Implémente LinkInterface.
Références Link\$href.
◆ getRels()
{Returns the relationship type(s) of the link.This method returns 0 or more relationship types for a link, expressed as an array of strings.
- Renvoie
- string[]
}
Implémente LinkInterface.
◆ hrefIsTemplated()
hrefIsTemplated |
( |
string |
$href | ) |
|
|
private |
◆ isTemplated()
{Returns whether or not this is a templated link.
- Renvoie
- bool True if this link object is templated, False otherwise.
}
Implémente LinkInterface.
Références Link\hrefIsTemplated().
◆ withAttribute()
withAttribute |
( |
|
$attribute, |
|
|
|
$value |
|
) |
| |
{Returns an instance with the specified attribute added.If the specified attribute is already present, it will be overwritten with the new value.
- Paramètres
-
string | $attribute | The attribute to include. |
string | $value | The value of the attribute to set. |
- Renvoie
- static
}
- Paramètres
-
Implémente EvolvableLinkInterface.
Références $this, et $value.
◆ withHref()
{Returns an instance with the specified href.
- Paramètres
-
string | $href | The href value to include. It must be one of:
- An absolute URI, as defined by RFC 5988.
- A relative URI, as defined by RFC 5988. The base of the relative link is assumed to be known based on context by the client.
- A URI template as defined by RFC 6570.
- An object implementing __toString() that produces one of the above values.
|
An implementing library SHOULD evaluate a passed object to a string immediately rather than waiting for it to be returned later.
- Renvoie
- static
}
- Renvoie
- static
Implémente EvolvableLinkInterface.
Références Link\$href, et $this.
◆ withoutAttribute()
withoutAttribute |
( |
|
$attribute | ) |
|
{Returns an instance with the specified attribute excluded.If the specified attribute is not present, this method MUST return normally without errors.
- Paramètres
-
string | $attribute | The attribute to remove. |
- Renvoie
- static
}
- Renvoie
- static
Implémente EvolvableLinkInterface.
Références $this.
◆ withoutRel()
{Returns an instance with the specified relationship excluded.If the specified rel is already not present, this method MUST return normally without errors.
- Paramètres
-
string | $rel | The relationship value to exclude. |
- Renvoie
- static
}
- Renvoie
- static
Implémente EvolvableLinkInterface.
Références Link\$rel, et $this.
◆ withRel()
{Returns an instance with the specified relationship included.If the specified rel is already present, this method MUST return normally without errors, but without adding the rel a second time.
- Paramètres
-
string | $rel | The relationship value to add. |
- Renvoie
- static
}
- Renvoie
- static
Implémente EvolvableLinkInterface.
Références Link\$rel, et $this.
◆ $attributes
◆ $href
◆ $rel
◆ REL_ALTERNATE
const REL_ALTERNATE = 'alternate' |
◆ REL_AUTHOR
const REL_AUTHOR = 'author' |
◆ REL_DNS_PREFETCH
const REL_DNS_PREFETCH = 'dns-prefetch' |
◆ REL_HELP
◆ REL_ICON
◆ REL_LICENSE
const REL_LICENSE = 'license' |
◆ REL_MERCURE
const REL_MERCURE = 'mercure' |
◆ REL_NEXT
◆ REL_PRECONNECT
const REL_PRECONNECT = 'preconnect' |
◆ REL_PREFETCH
const REL_PREFETCH = 'prefetch' |
◆ REL_PRELOAD
const REL_PRELOAD = 'preload' |
◆ REL_PRERENDER
const REL_PRERENDER = 'prerender' |
◆ REL_PREV
◆ REL_SEARCH
const REL_SEARCH = 'search' |
◆ REL_STYLESHEET
const REL_STYLESHEET = 'stylesheet' |
La documentation de cette classe a été générée à partir du fichier suivant :