https://github.com/netgusto/symfony-hmvcbundle
Stupid simple HMVC service for Symfony 2
https://github.com/netgusto/symfony-hmvcbundle
Last synced: 3 months ago
JSON representation
Stupid simple HMVC service for Symfony 2
- Host: GitHub
- URL: https://github.com/netgusto/symfony-hmvcbundle
- Owner: netgusto
- License: mit
- Created: 2014-06-01T11:35:49.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-06-01T11:43:18.000Z (over 11 years ago)
- Last Synced: 2025-03-23T19:23:44.749Z (10 months ago)
- Language: PHP
- Size: 105 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Stupid simple HMVC service for Symfony 2
## Install
In `composer.json`:
```json
"require": {
"netgusto/hmvc-bundle": "dev-master"
}
```
In `app/AppKernel.php`:
```php
$bundles = array(
# [...]
new Netgusto\HMVCBundle\NetgustoHMVCBundle(),
# [...]
);
```
## Use
```bash
namespace Acme\DemoBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller,
Symfony\Component\HttpFoundation\Request;
class DefaultController extends Controller {
public function someAction(Request $request) {
$newsletterResponse = $this->get('netgusto.hmvc')->delegate('AcmeDemoBundle:SomeOtherController:subscribeNewsletter');
return $this->render('AcmeDemoBundle:Default:home.html.twig', array(
'newsletter' => $newsletterResponse->getContent(),
));
}
}
```