netgusto / hmvc-bundle
Stupid simple HMVC service for Symfony 2
Installs: 32
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.3
- symfony/framework-bundle: ~2.4
This package is not auto-updated.
Last update: 2024-11-19 07:30:25 UTC
README
Install
In composer.json
:
"require": { "netgusto/hmvc-bundle": "dev-master" }
In app/AppKernel.php
:
$bundles = array( # [...] new Netgusto\HMVCBundle\NetgustoHMVCBundle(), # [...] );
Use
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(), )); } }