uwej711 / pimplex
Providers for symfony components for Pimple
Installs: 24
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/uwej711/pimplex
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: 2025-09-15 02:11:52 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');