PHPackages                             webino/webino-data - 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. webino/webino-data

ActiveLibrary

webino/webino-data
==================

Modular Data service over Zend Db

114.8k↑342.6%PHP

Since Aug 10Pushed 1y ago1 watchersCompare

[ Source](https://github.com/webino/WebinoData)[ Packagist](https://packagist.org/packages/webino/webino-data)[ RSS](/packages/webino-webino-data/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Webino modular Data service over Zend Db
========================================

[](#webino-modular-data-service-over-zend-db)

**Very early alpha version**

Provides lightweight data service.

Features
--------

[](#features)

- Configurable sql select
- Advanced search
- Input filter
- Bind to form \[NEED REFACTOR\]
- Auto column:
    - `datetime_add` \[INCOMPLETE\]
    - `datetime_update`

Setup
-----

[](#setup)

Following steps are necessary to get this module working, considering a zf2-skeleton or very similar application:

1. Run `php composer.phar require webino/webino-data:dev-develop`
2. Add `WebinoData` to the enabled modules list

QuickStart
----------

[](#quickstart)

**Better to check following**

```
`config/webinodataexample.local.php.dist`

`test/resources/IndexController.php`

```

**It needs update**

- Configure the data service:

    ```
    'di' => array(
        'instance' => array(
            'exampleTable' => array(
                'parameters' => array(
                    'table'   => 'example',
                    'adapter' => 'defaultDb',
                ),
            ),
            'exampleDataService' => array(
                'parameters' => array(
                    'tableGateway' => 'exampleTable',
                    'config' => array(
                        'searchIn' => array(           // search only defined columns
                            'title',
                        ),
                        'select' => array(             // list of available selects
                            'all' => array(
                            ),
                            'example' => array(
                                'columns' => array(
                                    array(
                                        '*',
                                        new \Zend\Db\Sql\Expression('(column/10) as rating'),
                                    ),
                                ),
                                'where' => array(
                                    array('column!=:param')
                                ),
                                'limit' => 100,
                                'order' => array(
                                    new \Zend\Db\Sql\Expression('RAND()'),
                                ),
                            ),
                        ),
                        'input_filter' => array(
                            'column' => array(
                                'name'       => 'column',
                                'required'   => false,
                                'validators' => array(
                                    array(
                                        'name' => 'digits',
                                        'options' => array(
                                        ),
                                    ),
                                ),
                                'filters' => array(
                                    array(
                                        'name' => 'int',
                                        'name' => 'Example\Filter',
                                    ),
                                ),
                            ),
                        ),
                    ),
                ),
            ),
        ),
    ),

    ```
- Select array of rows:

    ```
    // Optional parameters
    $parameters = array(':param' => 'value');

    $exampleDataService->select('all');

    ```
- Search:

    ```
    // Optional parameters
    $parameters = array(':param' => 'value');

    // Return just like term, but ignore inferior chars
    $exampleDataService->selectJust('search', $term, $parameters);

    // Return at least something like term
    $exampleDataService->selectLike('search', $term, $parameters);

    ```
- Bind form:

    ```
    $exampleDataService->bind($form);

    $form->setData($data);
    if ($this->form->isValid()) {
        // valid data were stored
    }

    ```
- Manual save:

    ```
    $exampleDataService->exchangeArray($row); // update if $row['id'] is not empty

    ```
- Validate data array: *throws exception on invalid*

    ```
    $exampleDataService->validate($data);

    ```
- Increment column in one query:

    ```
    $where = array('id' => $id);

    $exampleDataService->increment('count', $where);

    ```
- Delete:

    ```
    $where = array('column=?' => 'value');

    $exampleDataService->delete($where);

    ```
- Return related data rows:

    ```
    $relatedDataService->owned($exampleDataService, $id);

    ```
- Set owner id to the related row:

    ```
    $exampleDataService->own($relatedRow, $id);

    ```

Develop
-------

[](#develop)

**Requirements**

- Linux (recommended)
- NetBeans (optional)
- Phing
- PHPUnit
- Selenium
- Web browser

**Setup**

1. Be sure you have configured `~/.my.cnf` for the `mysqladmin` command
2. Clone this repository
3. Configure the db in the `test/resources/config.local.php.dist` and delete the `.dist` extension.
4. Run `phing update`

    Now your development environment is set.
5. Open project in (NetBeans) IDE
6. To check module integration with the skeleton application open following directory via web browser:

`._test/ZendSkeletonApplication/public/`

```
 e.g. [http://localhost/WebinoData/._test/ZendSkeletonApplication/public/](http://localhost/WebinoData/._test/ZendSkeletonApplication/public/)

```

7. Integration test resources are in directory: `test/resources`

    *NOTE: Module example config is also used for integration testing.*

**Testing**

- Run `phpunit` in the test directory
- Run `phing test` in the module directory to run the tests and code insights

    *NOTE: To run the code insights there are some tool requirements.*

Todo
----

[](#todo)

- Shared relations.
- Manual insert/update.
- Relation handle id array *(return related rows for multiple ids)*.

Addendum
--------

[](#addendum)

Please, if you are interested in this Zend Framework module report any issues and don't hesitate to contribute.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance26

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/c4a88e425997c1af6050f86801610a5291e7ea9f4ad58654df74d9106fb09637?d=identicon)[Webino](/maintainers/Webino)

---

Top Contributors

[![bacinsky](https://avatars.githubusercontent.com/u/3078875?v=4)](https://github.com/bacinsky "bacinsky (351 commits)")

---

Tags

dataframeworklibraryltsstorev2webinozend

### Embed Badge

![Health badge](/badges/webino-webino-data/health.svg)

```
[![Health](https://phpackages.com/badges/webino-webino-data/health.svg)](https://phpackages.com/packages/webino-webino-data)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
