for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* User: delboy1978uk
* Date: 04/12/2016
* Time: 15:01
*/
namespace Del\Form\Traits;
trait HasAttributesTrait
{
/** @var array $attributes */
private $attributes = [];
* @param $key
* @return mixed|string
public function getAttribute($key)
return isset($this->attributes[$key]) ? $this->attributes[$key] : null;
}
* @param $value
* @return $this
public function setAttribute($key, $value)
$this->attributes[$key] = $value;
return $this;
* @param array $attributes
public function setAttributes(array $attributes)
$this->attributes = $attributes;
* @return array
public function getAttributes()
return $this->attributes;