scolib/attributes

属性特征

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

This package is auto-updated.

Last update: 2024-08-29 04:27:41 UTC


README

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

安装

通过 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)

变更日志

有关最近更改的更多信息,请参阅 变更日志

测试

$ composer test

贡献

有关详细信息,请参阅 贡献指南行为准则

安全

如果您发现任何与安全相关的问题,请通过电子邮件 slice1213@gmail.com 反馈,而不是使用问题跟踪器。

致谢

许可协议

MIT 许可协议 (MIT)。有关更多信息,请参阅 许可文件