Giter VIP home page Giter VIP logo

zucchi's Introduction

Zucchi Framework Extensions

Custom extensions and additions to Zend Framework 2

This Library uses PHP 5.4 features

Components

  • Controller - Common controller features
  • DateTime - Custom Date/Time objects with pre defined __toString
  • Debug - Debug utilities
  • Event - Event Tools and traits
  • Form - Form factory with custom hydration
  • Image - Generic representation of an Image
  • ServiceManager - Service Manager Tools and Traits
  • Traits - A helper to get the traits of all ancestors
  • View - Custom Helpers and strategies

Request Parser Trait

This trait introduces consistent parsing of parameters in a query string that can then be consumed by appropriate Zucchi Query builder classes

Simple query

?where[forename][value]=john
&where[forname][operator]=fuzzy

Complex nexted where query without explicit field definitions

?where[mode]=and
&where[expressions][0][mode]=or
&where[expressions][0][forename][value]=john
&where[expressions][0][forename][operator]=fuzzy
&where[expressions][0][surname][value]=john
&where[expressions][0][surname][operator]=fuzzy
&where[expressions][0][expressions][0][mode]=and
&where[expressions][0][expressions][0][email][value]=john
&where[expressions][0][expressions][0][email][operator]=fuzzy
&where[expressions][0][expressions][0][username][value]=john
&where[expressions][0][expressions][0][username][operator]=fuzzy
&where[expressions][1][id][value][0]=1
&where[expressions][1][id][operator]=nin

Complex nexted where query with explicit field definitions to allow use of "mode" & "expressions" as a field

?where[mode]=and
&where[expressions][0][mode]=and
&where[expressions][0][fields][forename][value]=john
&where[expressions][0][fields][forename][operator]=fuzzy
&where[expressions][0][fields][mode][value]=active
&where[expressions][0][fields][surname][operator]=eq

Available operators and modes include

    protected $requestOperators = array(
        'is'    => 'is',
        'eq'    => '=',
        'gt'    => '>',
        'gte'   => '>=',
        'lt'    => '<',
        'lte'   => '<=',
        'neq'   => '!=',
        'in'   => 'in',
        'nin'   => 'not in',
        'between' => 'between',
        'fuzzy' => 'like',
        'regex' => 'regexp',
    );

    protected $requestModes = array(
        'or' => 'or',
        'and' => 'and',
    );

zucchi's People

Contributors

davezucchi avatar fidelski avatar mgldev avatar phpboyscout avatar r-nicol avatar vincequeiroz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

zucchi's Issues

Please tag releases

Please "release" versions using github so that they can be targetted individually with composer.

Even if they're pre-1.0

Cloning the repository - Exception folder has two versions

When I cloned the repository on Windows I run into problems because there are two folders with the name "Exception". One is spelt with a lowercase e
src/Zucchi/Exception
src/Zucchi/exception

This causes git to show uncommited changes. It wants to delete the work done.

Can you update this so only the correct exceptions folder is present?

Wrong archive tar composer dependency

Hi!

The composer dependency for archive_tar seems to be wrong.
I'm only able to get "pear/archive_tar": "dev-master". "pear-pear/archive_tar" is not found

Closures in configuration file

Hello,

Is it possible to remove the closure in the configuration file config/module.config.php ?

Having non-scalars in the configuration arrays removes the ability to cache the configuration.

required zf version

The required version of zf2 is currently 2.3.
At the moemnt zf2 is at 2.5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.