PHPackages                             zucchi/zucchi - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. zucchi/zucchi

ActiveLibrary[Framework](/categories/framework)

zucchi/zucchi
=============

Zucchi Component Library for Zend Framework 2

0.16(9y ago)121.5k91BSD-3-ClausePHPPHP &gt;=5.5.29

Since Jul 8Pushed 9y ago3 watchersCompare

[ Source](https://github.com/zucchi/Zucchi)[ Packagist](https://packagist.org/packages/zucchi/zucchi)[ Docs](https://github.com/zucchi/Zucchi)[ RSS](/packages/zucchi-zucchi/feed)WikiDiscussions master Synced yesterday

READMEChangelog (8)Dependencies (13)Versions (9)Used By (1)

Zucchi Framework Extensions
===========================

[](#zucchi-framework-extensions)

Custom extensions and additions to Zend Framework 2

**This Library uses PHP 5.4 features**

Components
----------

[](#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
--------------------

[](#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" &amp; "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'    => '
