andrebian / zf3-service-manager-trait
A fast way to get the Zend Framework 3's service manager in controllers
Installs: 578
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/andrebian/zf3-service-manager-trait
Requires
This package is auto-updated.
Last update: 2025-09-29 02:14:52 UTC
README
A fast way to get the Zend Framework 3's service manager in controllers
Install
composer require andrebian/zf3-service-manager-trait
Usage
In a controller
<?php namespace YourNamespace; use ServiceManagerTrait\ServiceManagerTrait; /** * Class YourController * @package YourNamespace */ class YourController extends AbstractActionController { use ServiceManagerTrait; public function someAction() { $serviceManager = $this->getServiceManager(); } }
Contributions
You can open an issue or fork this repository, modify whatever you want and send a Pull Request.