scolib/attributes

Attributes Trait

v1.0.3 2017-06-14 08:57 UTC

This package is auto-updated.

Last update: 2024-10-29 04:58:54 UTC


README

StyleCI Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Install

Via Composer

$ composer require scolib/attributes

Usage

use Sco\Attributes\HasAttributesTrait;

class Demo
{
    use HasAttributesTrait;
}

Method

/**
 * 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)

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please email slice1213@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.