Skip to content

HTML Components


The Phalcon\Html\Attributes is a wrapper of Phalcon\Support\Collection. It also contains two more methods render() and __toString(). render() uses Phalcon\Html\TagFactory internally to render the attributes that an HTML element has. These HTML attributes are defined in the object itself.

The component can be used on its own if you want to collect HTML attributes in an object and then render them (return them as a string) in a key=value format.

This component is used internally by Phalcon\Forms\Form to store the attributes of form elements.