matryoshka-model / zf2-matryoshka-module
ZF2 integration module for Matryoshka
v0.8.0
2016-03-17 17:43 UTC
Requires
- php: >=5.5
- matryoshka-model/matryoshka: ~0.8.0
- zendframework/zend-modulemanager: 2.*
- zendframework/zend-mvc: 2.*
Requires (Dev)
- phpunit/phpunit: ~4.3
- satooshi/php-coveralls: dev-master
Suggests
- matryoshka-model/mongo-wrapper: MongoDB matryoshka wrapper
- matryoshka-model/rest-wrapper: Matryoshka wrapper aimed at creating restful API clients
- matryoshka-model/service-api: A set of utilities aimed at consuming HTTP API services
This package is not auto-updated.
Last update: 2024-12-21 16:56:50 UTC
README
ZF2 module for Matryoshka -------------------------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 }