Added cached Instantiator to be used in production instead of the Runtime version

Runtime Instantiator is dangerous to be used in Production, and you probably should not need to code your own implementation of a cached one everytime you need to use Lazy Loading. Solution, use this one instead.

Original solution by Dries Vanlerberghe.
Code sponsored by Capgemini.
ah, yes, again Drupal/Syfmony coding standards.


----
Alejandro Moreno López
Publicidad en Internet | Programadores web
www.seoluciones.net | www.programadoresweb.net
blog de Publicidad -> PublicidadenInternet.biz



On Fri, Jun 27, 2014 at 4:58 PM, Christophe Coevoet <
notifications@github.com> wrote:

> In
> src/Symfony/Bridge/ProxyManager/LazyProxy/Instantiator/CachedInstantiator.php:
>
> > +use Symfony\Component\DependencyInjection\LazyProxy\Instantiator\InstantiatorInterface;
> > +
> > +/**
> > + * Lazy loading proxy generator (Using cached Proxy to improve performance).
> > + */
> > +class CachedInstantiator implements InstantiatorInterface
> > +{
> > +    /**
> > +     * @var \ProxyManager\Factory\LazyLoadingValueHolderFactory
> > +     */
> > +    private $factory;
> > +
> > +    /**
> > +     * Constructor
> > +     */
> > +    public function __construct($proxies_path)
>
> please use a camelCased name for the variable
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/symfony/symfony/pull/11245/files#r14300121>.
>