cybersai/ussd-decision
Composer 安装命令:
composer require cybersai/ussd-decision
包简介
Making chained decision using an object class
README 文档
README
Making decision using an Object Oriented Decision fallback
No Real Documentation for now, but for now you can read the tests.
include 'vendor/autoload.php'; use Cybersai\UssdDecision\UssdDecision; echo UssdDecision::using('0241122331') // Argument to use for decision making ->integer('It an integer') // Return this is the argument is an integer ->equal('0241122442', 'It my Number') // Return this is the argument is equal to the parameter given ->in(['05451111111', '05452222222'], 'It a schools line') // Return this is the argument is array provider ->length(6, 'Too short') // Return this is the argument length is 6 ->phoneNumber('It a phone number') // Return this is the argument is a valid phone number ->any('Did not match any') // Just return this ->outcome(); // Give the outcome of the decision chain
// Output
It a phone number
Installation
composer require cybersai/ussd-decision
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-03-14