library nette-proxy-service
Lazy services for Nette Framework
radekdvorak/nette-proxy-service
Lazy services for Nette Framework
- Wednesday, February 18, 2015
- by radek.dvorak
- Repository
- 0 Watchers
- 0 Stars
- 7 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 0 % Grown
Nette Proxy Generator
This Nette Framework extension allows you to hide services in proxy classes. Seldom used yet still initialized services
are hidden, eventual expensive object initiation is postponed. The real service class gets instantiated as soon as
the proxy class property or method is accessed., (*1)
Instructions
- Have composer install the source code
composer.phar require radekdvorak/nette-proxy-service:0.*
- Enable the extension in your neon config
extensions:
proxyService: NetteProxyService\DI\ProxyServiceExtension
- Configure directory for proxy class cache
proxyService:
cacheDir: some/directory
# disable in production
autogenerateProxyClasses: true
-
Tag selected services with proxyService.lazy
(the prefix depends on the extension registration name), (*2)
-
Setup an autoloader for the cacheDir (see RobotLoader if you are not sure what to do), (*3)
Notes:
- This extension is quite new therefore consider it a bit experimental
dev-master
9999999-dev
Lazy services for Nette Framework
Sources
Download
GPL-3.0
BSD-3-Clause
GPL-2.0
The Requires
The Development Requires
by
Radek Dvořák
proxy
nette
0.0.1
0.0.1.0
Lazy services for Nette Framework
Sources
Download
GPL-3.0
BSD-3-Clause
GPL-2.0
The Requires
by
Radek Dvořák
proxy
nette