insprintorob/phpservices 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

insprintorob/phpservices

Composer 安装命令:

composer require insprintorob/phpservices

包简介

Insprinto PHP Services Module. Provides mockable classes that wrap around standard PHP functionality

README 文档

README

PHPServices provides mockable wrapper classes around standard PHP functionality

Installation

Install using composer

        require "insprintorob/phpservices": "dev-master"

Purpose

Years ago what initially attracted me to PHP was the huge standard library of built in functions with its massive array of functionality. However, the built in functions are is not 100% consistent with their names and parameter orders. If your doing modern Test Driven Development, calls to built in functions cannot be tested by unit tests.

PHPServices provides classes that wrap around standard PHP functionality such as the standard built in functions. For example, instead of str_replace(), you might use $stringOperations->replace(). It also provides HttpService, with functionality such as getQuery(), getPost() and getUserAgent() which saves you from needing to directly access parts of the $_GET, $_POST and $_SERVER superglobals.

If your contributing new functions, try to make sure they are named consistently with existing PHPServices functions and have a consistent parameter order. You don't have to replicate the function names and parameter orders of the php standard library. Function names should follow PSR naming conventions with no abbreviations of words.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2015-05-14