ciebit/legislation
最新稳定版本:v0.4.1
Composer 安装命令:
composer require ciebit/legislation
包简介
Módulo de representação de Leis, Decretos e Portarias
README 文档
README
Representation of Laws, Decrees, Ordinances and Constitution.
Config Tests
- Copy file
tests/settings.model.phptotests/settings.php; - Edit the
tests/settings.phpfile by adding the database settings; - Run
composer install; - Run
./vendor/bin/phpunit;
Example Storage
require __DIR__.'/vendor/autoload.php'; use Ciebit\Legislation\Documents\Factories\Law as LawFactory; use Ciebit\Legislation\Documents\Storages\Databases\Sql; $lawFactory = new Factory(); $lawFactory->setTitle('Law 12.345/2020') ->setDateTime(new DateTime('2020-02-06')) ->setStatus(Status::ACTIVE()) ->setNumber(12345) ->setSlug('law-2020') ->setDescription('Defines rules for the construction of public schools.'); $law = $lawFactory->create(); $storage = new Sql(new PDO(/** your settings */)); $id = $storage->store($law);
Example Find
require __DIR__.'/vendor/autoload.php'; use Ciebit\Legislation\Documents\Storages\Databases\Sql; use Ciebit\Legislation\Documents\Decree; use Ciebit\Legislation\Documents\Status; $storage = new Sql(new PDO(/** your settings */)); $documentCollection = $storage ->addFilterByType('=', Decree::class) ->addFilterByStatus(Status::ACTIVE()) ->find(); foreach($documentCollection as $decree) { echo "{$decree->getTitle()}" . PHP_EOL; }
统计信息
- 总下载量: 432
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-02-08