matryoshka-model/zf2-matryoshka-module

ZF2 integration module for Matryoshka

v0.8.0 2016-03-17 17:43 UTC

README

ZF2 module for Matryoshka -------------------------

Latest Stable Version Build Status Coverage Status Matryoshka Model's Slack

ZF2 integration module for Matryoshka.

This repository contains a ZF2 module that registers default services and provides a set of useful controller plugins.

Community

For questions and support please visit the slack channel (get an invite here).

Installation

Using composer:

Add the following to your composer.json file:

"require": {
    "matryoshka-model/zf2-matryoshka-module": "~0.8.0"
}

Finally, add the module name to your project's config/application.config.php under the modules key:

return [
    /* ... */
    'modules' => [
        /* ... */
        'Matryoshka',
    ],
    /* ... */
];

How-to

Before using this module you only need to configure Matryoshka settings according to your model.

Then you can use built-in plugins in your controllers.

Example:

public function fooAction()
{
	$myModel  = $this->model()->get('MyModel'); // Retrieve a model instance through the ModelManager
	$myObject = $this->object()->get('MyObject'); // Retrieve an object instance through the ModelManager
}

Analytics