minerva-sistemas / minerva-signatures
在PHP中实现文档签名
v1.0
2016-07-11 11:55 UTC
Requires
- easyframework/collections: 5.0.0-beta
Requires (Dev)
- phpunit/phpunit: 5.4.6
This package is not auto-updated.
Last update: 2024-09-23 12:40:42 UTC
README
composer require minerva-sistemas/minerva-signatures
使用注释为您的对象创建签名。要创建签名,只需按照以下示例操作,其中我们为对象创建了一个配置签名。您可以使用任何标签创建您的签名,只要它是JSON格式且有一个键和值。
/** * @configure {"adapter":"Connection1"} * @configure {"table":"loja_cliente"} */ class Cliente {}
访问定义的值也很简单。
$cliente = new Cliente(); $configuration = SignatureParser::getDictionary($cliente); echo $configuration->get('table')->getValue(); // loja_cliente echo $configuration->get('table')->getName(); // table