承接 saitamahero/condiment 相关项目开发

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

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

saitamahero/condiment

最新稳定版本:v0.2.0

Composer 安装命令:

composer require saitamahero/condiment

包简介

A PHP library for evaluating conditional statements

README 文档

README

Conditional Statement (Condiment)

Condiment is a PHP library focused on evaluating conditions.The main goal of this library is to allow programmers to evaluate conditions and manage workflows in their applications.

Usage

use Condiment\Evaluables\Evaluators\FluentEvaluator;

$evaluator = new FluentEvaluator();

// Basic condition evaluation
$evaluator->equals("Hello", "Hello")->evaluate(); // true

// Fluent API: chaining conditions with AND
$evaluator->contains("Hello! This is the Condiment library", "condiment")
          ->equals(1, 1)
          ->evaluate(); // true

// This results in: `contains AND equals`

// Using NOT and OR operators for complex evaluations
$evaluator->contains("Rice", "ice")
          ->orNotContains("water", "ter")
          ->evaluate(); // true

// This results in: `contains OR !contains`

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-03-19