2017 © Pedro Peláez
 

library phpservices

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

image

insprintorob/phpservices

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

  • Thursday, August 13, 2015
  • by insprintorob
  • Repository
  • 1 Watchers
  • 0 Stars
  • 206 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

PHPServices provides mockable wrapper classes around standard PHP functionality, (*1)

Installation

Install using composer, (*2)

        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., (*3)

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., (*4)

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., (*5)

The Versions

13/08 2015

dev-master

9999999-dev

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

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.4