dev-master
9999999-devSupport Facades for Symfony service.
MIT
The Requires
The Development Requires
v0.1.0
0.1.0.0Support Facades for Symfony service.
MIT
The Requires
The Development Requires
Support Facades for Symfony service.
Support Facades for Symfony service., (*2)
thanks to:, (*3)
Indragunawan\FacadeBundle\AbstractFacade
class automatically tagged as facade.If your project already uses Symfony Flex, execute this command to download, register and configure the bundle automatically:, (*4)
composer require indragunawan/facade-bundle
If you install without using Symfony Flex, first add the bundle by using composer then enable the bundle by adding new Indragunawan\FacadeBundle\IndragunawanFacadeBundle()
to the list of registered bundles in the app/AppKernel.php file of your project, (*5)
To create a facade create a class that extends base Indragunawan\FacadeBundle\AbstractFacade
class and implement the getFacadeAccessor
method that returns the service id
, support private and public service., (*6)
<?php namespace App\Facades; use Indragunawan\FacadeBundle\AbstractFacade; class Foo extends AbstractFacade { protected static function getFacadeAccessor() { return 'App\Service\Foo'; // service id - supports private and public service. } }
Now the facade now ready. Simply import the facade namespace. When you call any static method on the Foo
facade, then it will resolve the service that you define in getFacadeAccessor
method and call the requested method from the service., (*7)
This bundle is under the MIT license. See the complete license, (*8)
Support Facades for Symfony service.
MIT
Support Facades for Symfony service.
MIT