kphoen/rulerz-spec-builder
最新稳定版本:1.2.0
Composer 安装命令:
composer require kphoen/rulerz-spec-builder
包简介
Specification builder for RulerZ
README 文档
README
This library provides an object-oriented way to build Specifications for RulerZ.
Installation
composer require 'kphoen/rulerz-spec-builder'
Usage
$spec = Expr::andX( Expr::equals('gender', 'F'), Expr::moreThan('points', 3000) );
This is equivalent to gender = "F" and points > 3000
Here is a more complex example:
$spec = Expr::orX( Expr::andX( Expr::equals('gender', 'F'), Expr::moreThan('points', 3000) ), Expr::andX( Expr::equals('gender', 'M'), Expr::moreThan('points', 6000) ) );
Which is equivalent to: (gender = "F" and points > 3000) or (gender = "M" and points > 6000)
See the Expr class for an exhaustive list of supported methods.
License
This library is under the MIT license.
统计信息
- 总下载量: 48.21k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 11
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 5
其他信息
- 授权协议: MIT
- 更新时间: 2015-08-15