PHP Class Essence\Dom\Tag

Show file Open project: benjamminf/craft-embedded-assets Class Usage Examples

Public Methods

Method Description
get ( string $name, mixed $default = '' ) : mixed Returns the value of an attribute.
matches ( string $name, string $pattern, array &$matches = [] ) : boolean Tests if the value of an attribute matches the given pattern.

Method Details

get() abstract public method

Returns the value of an attribute.
abstract public get ( string $name, mixed $default = '' ) : mixed
$name string Attribute name.
$default mixed Default value to be returned if the attribute doesn't exist.
return mixed Attribute value, or $default.

matches() public method

Tests if the value of an attribute matches the given pattern.
public matches ( string $name, string $pattern, array &$matches = [] ) : boolean
$name string Attribute name.
$pattern string Pattern.
$matches array Search results.
return boolean If the attribute value matches the pattern.