Download the PHP package stamina/chequer-php without Composer

On this page you can find all versions of the php package stamina/chequer-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package chequer-php

Chequer 0.2

THE SPARKLING NEW LANGUAGE FOR CHECKING THINGS IN A SANE WAY
Match scalars, arrays, objects and grumpy cats against the query of Your choice!

Checkout the chequer.stamina.pl for more information!

Oh wait! There is more!

Part of the package is DynamicObject class, which lets you dynamically create classes in PHP, modify object's methods on the fly, extend objects and moar! Go check it out! It's here to make typecasting easy, but it's pretty awesome on it's own!


Install

Use Composer package stamina/chequer-php to install.

The minimum required PHP version is 5.3. Because 5.4 introduces the shorthand array syntax - this version is recommended and used in this documentation.

Build Status


Usage and examples

Usage

There are a couple of usage patterns to choose from.

Simple checks

For simple checks use static function checkValue()

Reusing the query

When you want to reuse your query, or pass it somewhere as a callback, create the object and call check method, or invoke the object.

Global configuration

You can store all your queries in configuration files and use them when they are needed. This way you can separate your validation/filtering logic from your code - just like you do with the templates!

As every query is a scalar or an array - they can be easely stored in JSON, YAML, MongoDB - you name it.

Dependency injection

If you rather prefer DI - fret not. You can add rules to Chequer objects directly, which means you can make a factory, or pass the Chequer object around and still populate it with predefined rules.

The above example rewritten as Silex factory:


Note, that the whole idea is very fresh. I've come up with the concept on January 29th, and made the lib the same day.
And that means - it will change!

©2013 Rafal Lindemann

githalytics.com alpha


All versions of chequer-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package stamina/chequer-php contains the following files

Loading the files please wait ....