aedart/model-hash-algorithm

此包已被弃用且不再维护。没有推荐替代包。

模型哈希算法(名称)的获取器和设置器包。此包是'Aedart\Model'命名空间的一部分;访问https://bitbucket.org/aedart/model了解更多项目信息。官方子包网站(https://bitbucket.org/aedart/model-hash-algorithm)

1.2.0 2015-06-21 18:00 UTC

This package is auto-updated.

Last update: 2022-02-01 12:46:12 UTC


README

模型哈希算法(名称)的获取器和设置器包。

此包是Aedart\Model命名空间的一部分;访问https://bitbucket.org/aedart/model了解更多关于项目的信息。

官方子包网站(https://bitbucket.org/aedart/model-hash-algorithm

内容

[目录]

何时使用此包

当你需要记录使用了哪种哈希算法时

如何安装

#!console

composer require aedart/model-hash-algorithm 1.*

此包使用composer。如果你不知道它是做什么的或如何工作,我建议在尝试使用此包之前先了解一些相关信息。

快速入门

假设你有一个人等的接口,你可以扩展hash-algorithm-aware接口;

#!php
<?php
use Aedart\Model\Hash\Algorithm\Interfaces\HashAlgorithmAware;

interface IFile extends HashAlgorithmAware {

    // ... Remaining interface implementation not shown ...
    
}

在你的具体实现中,简单地使用hash-algorithm-traits;

#!php
<?php
use Aedart\Model\Hash\Algorithm\Traits\HashAlgorithmTrait;

class MyPicture implements IFile {
 
    use HashAlgorithmTrait;

    // ... Remaining implementation not shown ... 
 
}

许可证

BSD-3-Clause,阅读包含在此包中的LICENSE文件