承接 flyandi/is 相关项目开发

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

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

flyandi/is

Composer 安装命令:

composer require flyandi/is

包简介

A collection of useful is conditions.

README 文档

README

Is for PHP is a small library that provides some handy methods to quickly check or validate the contents of a variable.

Install it

Install the library via composer:

composer install flyandi/is

How to use it

Pretty straightforward. The library exposes the static class Is that contains all the evaluating methods, e.g.:

$AnArray = ['red', 'blue', green];

$AnColor = '#00FF00';

if(Is::_array($AnArray)) echo "Yes, it's an array!";

if(Is::hexcolor($AnColor)) echo "This is a valid color code.";

Methods

The Is library implements the following methods currently:

Method Description
iterable Checks if an object can be iterated, e.g. forEach
fn Returns true if the argument is an function
object Returns true if the argument is an object
array Returns true if the argument is an array
string Returns true if the argument is an string
number Returns true if the argument is an number
boolean Returns true if the argument is an "true" boolean, e.g. TRUE or FALSE
defined Returns true if the argument is defined, e.g. not undefined
empty Returns true if the argument is really empty
same Returns true if two arguments are equal, e.g. Is.same('1', '1');
associated Returns true if the argument is an associated array
sequential Returns true if the argument is an sequential array

Additionally the library also provides some basic validation expression filters:

Method Description
url Returns true if the argument contains a URL
email Returns true if the argument contains an E-Mail
creditcard Returns true if the argument contains an Credit Card Number
alphanumeric Returns true if the argument contains an Alpha Numeric string
time Returns true if the argument contains an time
datestring Returns true if the argument contains an date string
zip Returns true if the argument contains an ZIP Code
phone Returns true if the argument contains a US Phone Number
ssn Returns true if the argument contains a Social Security Number
affirmative Returns true if the argument contains True, Yes or Ok
hexadecimal Returns true if the argument contains a hexadecimal string
hexcolor Returns true if the argument contains an HTML color

Other Implementations

This library was originally written in JavaScript for Meteor (http://github.com/flyandi/meteor-is) and implements the same methods and filters.

flyandi/is 适用场景与选型建议

flyandi/is 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 19.09k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2015 年 10 月 19 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 flyandi/is 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 flyandi/is 我们能提供哪些服务?
定制开发 / 二次开发

基于 flyandi/is 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-10-19