承接 kphoen/rulerz-spec-builder 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 5

GitHub 信息

  • Stars: 11
  • Watchers: 1
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-08-15