Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence de la classe Link
+ Graphe d'héritage de Link:

Fonctions membres publiques

 __construct (string $rel=null, string $href='')
 
 getHref ()
 
 isTemplated ()
 
 getRels ()
 
 getAttributes ()
 
 withHref ($href)
 
 withRel ($rel)
 
 withoutRel ($rel)
 
 withAttribute ($attribute, $value)
 
 withoutAttribute ($attribute)
 

Champs de données

const REL_ALTERNATE = 'alternate'
 
const REL_AUTHOR = 'author'
 
const REL_HELP = 'help'
 
const REL_ICON = 'icon'
 
const REL_LICENSE = 'license'
 
const REL_SEARCH = 'search'
 
const REL_STYLESHEET = 'stylesheet'
 
const REL_NEXT = 'next'
 
const REL_PREV = 'prev'
 
const REL_PRELOAD = 'preload'
 
const REL_DNS_PREFETCH = 'dns-prefetch'
 
const REL_PRECONNECT = 'preconnect'
 
const REL_PREFETCH = 'prefetch'
 
const REL_PRERENDER = 'prerender'
 
const REL_MERCURE = 'mercure'
 

Fonctions membres privées

 hrefIsTemplated (string $href)
 

Attributs privés

 $href = ''
 
 $rel = []
 
 $attributes = []
 

Documentation des constructeurs et destructeur

◆ __construct()

__construct ( string  $rel = null,
string  $href = '' 
)

Références Link\$href, Link\$rel, et null.

Documentation des fonctions membres

◆ getAttributes()

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()

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()

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

Références Link\$href.

Référencé par Link\isTemplated().

◆ isTemplated()

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$attributeThe attribute to include.
string$valueThe value of the attribute to set.
Renvoie
static
}

Paramètres
string|

Implémente EvolvableLinkInterface.

Références $this, et $value.

◆ withHref()

withHref (   $href)

{Returns an instance with the specified href.

Paramètres
string$hrefThe 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$attributeThe attribute to remove.
Renvoie
static
}

Renvoie
static

Implémente EvolvableLinkInterface.

Références $this.

◆ withoutRel()

withoutRel (   $rel)

{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$relThe relationship value to exclude.
Renvoie
static
}

Renvoie
static

Implémente EvolvableLinkInterface.

Références Link\$rel, et $this.

◆ withRel()

withRel (   $rel)

{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$relThe relationship value to add.
Renvoie
static
}

Renvoie
static

Implémente EvolvableLinkInterface.

Références Link\$rel, et $this.

Documentation des champs

◆ $attributes

$attributes = []
private

Référencé par Link\getAttributes().

◆ $href

$href = ''
private

◆ $rel

$rel = []
private

◆ REL_ALTERNATE

const REL_ALTERNATE = 'alternate'

◆ REL_AUTHOR

const REL_AUTHOR = 'author'

◆ REL_DNS_PREFETCH

const REL_DNS_PREFETCH = 'dns-prefetch'

◆ REL_HELP

const REL_HELP = 'help'

◆ REL_ICON

const REL_ICON = 'icon'

◆ REL_LICENSE

const REL_LICENSE = 'license'

◆ REL_MERCURE

const REL_MERCURE = 'mercure'

◆ REL_NEXT

const REL_NEXT = '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

const REL_PREV = '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 :