for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace AppUtils;
trait Traits_Attributable
{
abstract public function getAttributes() : AttributeCollection;
public function hasAttributes() : bool
return $this->getAttributes()->hasAttributes();
}
/**
* @param string $name
* @param string|number|bool|Interface_Stringable|StringBuilder_Interface|NULL $value
* @return $this
*/
public function attr(string $name, $value)
$this->getAttributes()->attr($name, $value);
return $this;
* @param string $value
public function attrURL(string $name, string $value)
$this->getAttributes()->attrURL($name, $value);
public function attrQuotes(string $name, $value)
$this->getAttributes()->attrQuotes($name, $value);
* @param bool $enabled
public function prop(string $name, bool $enabled=true)
$this->getAttributes()->prop($name, $enabled);
public function removeAttribute(string $name)
$this->getAttributes()->remove($name);