uwej711 / pimplex
Providers for symfony components for Pimple
dev-master
2013-11-11 12:02 UTC
Requires
- monolog/monolog: ~1.4,>=1.4.1
- pimple/pimple: 1.*
- symfony/config: >=2.3,<2.4-dev
- symfony/form: >=2.3,<2.4-dev
- symfony/http-foundation: >=2.3,<2.4-dev
- symfony/monolog-bridge: >=2.3,<2.5-dev
- symfony/templating: >=2.3,<2.4-dev
- symfony/twig-bridge: >=2.3,<2.4-dev
- symfony/validator: >=2.3,<2.4-dev
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is auto-updated.
Last update: 2024-12-15 00:41:57 UTC
README
This library contains ServiceProviders for Pimple to use Symfony 2 components.
The code for the providers was taken from Silex and modified to work with plain Pimple for use cases where you don't need the full (micro) framework, e.g. for adding Symfony Components to an existing PHP application. See the LICENSE file.
Usage:
<?php require_once __DIR__.'/vendor/autoload.php'; $container = new Pimplex\Container(); $container->register(new Pimplex\ServiceProvider\TwigServiceProvider()); container['twig.path'] = 'your-template-path'; echo $container['twig']->render('hello.twig', array('name' => 'World');
or if you use plain Pimple
<?php require_once __DIR__.'/vendor/autoload.php'; $container = new \Pimple(); $twigServiceProvider = new Pimplex\ServiceProvider\TwigServiceProvider(); $twigServiceProvider->register($container); container['twig.path'] = 'your-template-path'; echo $container['twig']->render('hello.twig', array('name' => 'World');