Releases: mcaskill/php-html-build-attributes
Releases · mcaskill/php-html-build-attributes
v1.3.0
Complete commits list: v1.2.1...v1.3.0
Summary:
- Improved support for custom escape functions by passing attribute value and name:
(string $attribute_value, string $attribute_name): string
- Moved escape function resolution outside of iteration of attributes to evaluate once.
- Renamed parameters and variables to improve clarity.
v1.2.1
Complete commits list: v1.2.0...v1.2.1
Summary:
- Callable attribute value must be a
Closure
or invokable object. Prevents accidentally calling a function by string name.
v1.2.0
Complete commits list: v1.1.0...v1.2.0
Summary:
- Require JSON extension
- Add support invokable objects as well as closure's for the attribute value.
- Moved callable attribute value to earlier in case its value is
null
or a special object. - Moved JSON serialization to later in the function for improved variance support.
- If attribute value is an empty array, the attribute is ignored instead of rendering an empty string attribute.
- If attribute value is
false
, the attribute is ignored instead of concatenating an extra space.
v1.1.0
Complete commits list: v1.0.0...v1.1.0
Summary:
- Updated package to reflect move from gist to repository.
- Fixed missing support for objects as affirmed in the README.
- Fixed superfluous spaces from attributes by skipping null values.
- Added support for boolean values derived from callable values.
- Added support for numeric values.
- Trim leading and trailing whitespace from the attribute name.
- Skip attribute if name is empty.