Property | Type | Description | |
---|---|---|---|
$config | The base configuration inherited by classes. |
Property | Type | Description | |
---|---|---|---|
$attributes | The object's attribute. | ||
$element | The element name. | ||
$injectedProperties | A list of class properties to be added to attributes. | ||
$isOpened | Whether the current tag is opened or not. | ||
$isSelfClosing | Whether the element is self closing. | ||
$value | The object's value. |
Method | Description | |
---|---|---|
__call ( string $method, array $parameters ) | Dynamically set attributes. | |
__get ( string $item ) : mixed | Get an attribute or a child. | |
__set ( string $attribute, string $value ) | Dynamically set an attribute. | |
__toString ( ) : string | null | Render on string conversion. | |
addClass ( string $class ) | Add one or more classes to the current field. | |
close ( ) : string | null | Close the Tag. | |
getAttribute ( string $attribute ) : mixed | Get an attribute. | |
getAttributes ( ) : array | Get all attributes. | |
getContent ( ) : string | Returns the Tag's content. | |
getValue ( ) : string | null | Get the value. | |
isOpened ( ) : boolean | Check if the tag is opened. | |
open ( ) : string | null | Opens the Tag. | |
openOn ( $onChildren ) : string | Open the tag tree on a particular child. | |
removeAttribute ( string $attribute ) | Remove an attribute. | |
removeClass ( string $classes ) | Remove one or more classes to the current field. | |
render ( ) : string | null | Default rendering method. | |
replaceAttributes ( array $attributes ) | Replace all attributes with the provided array. | |
setAttribute ( string $attribute, string | null $value = null ) | Set an attribute. | |
setAttributes ( array $attributes ) | Set a bunch of parameters at once. | |
setElement ( string $element ) | Changes the Tag's element. | |
setValue ( string $value ) | Change the object's value. | |
wrapValue ( string $tag ) | Wrap the value in a tag. | |
wrapWith ( string | HtmlObject\Element $element, $name = null ) : HtmlObject\Element | Wrap the Element in another element. |
Method | Description | |
---|---|---|
getTagCloser ( ) : string | Get the preferred way to close a tag. | |
injectProperties ( ) : array | Return an array of protected properties to bind as attributes. | |
renderChildren ( ) : string | Get all the children as a string. | |
setTag ( string $element, string | null $value = null, array $attributes = [] ) | Set up a new tag. |
public __toString ( ) : string | null | ||
return | string | null |
public getAttribute ( string $attribute ) : mixed | ||
$attribute | string | |
return | mixed |
protected getTagCloser ( ) : string | ||
return | string |
protected injectProperties ( ) : array | ||
return | array |
public removeAttribute ( string $attribute ) | ||
$attribute | string |
public removeClass ( string $classes ) | ||
$classes | string | The class(es) to remove |
protected renderChildren ( ) : string | ||
return | string |
public replaceAttributes ( array $attributes ) | ||
$attributes | array | The attributes to replace with |
public setAttributes ( array $attributes ) | ||
$attributes | array | The attributes to add to the existing ones |
public setElement ( string $element ) | ||
$element | string |
public static $config |
protected $injectedProperties |