Via Composer
$ composer require scolib/attributes
use Sco\Attributes\HasAttributesTrait;
class Demo
{
use HasAttributesTrait;
}
/**
* Get the specified log value.
*
* @param null|string $key
* @param mixed $default
*
* @return mixed
*/
public function getAttribute($key = null, $default = null)
/**
* Set a given log value.
*
* @param array|string $key
* @param mixed $value
*
* @return bool
*/
public function setAttribute($key, $value = null)
/**
* @param string|int $key
*
* @return bool
*/
public function existsAttribute($key)
/**
* @param string|array $keys
*
* @return bool
*/
public function hasAttribute($keys)
Please see CHANGELOG for more information on what has changed recently.
$ composer test
Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.