PHPackages                             indragunawan/facade-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. indragunawan/facade-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

indragunawan/facade-bundle
==========================

Support Facades for Symfony services.

v0.2.0(6y ago)1713.7k↑346.7%2[1 issues](https://github.com/IndraGunawan/facade-bundle/issues)MITPHPPHP ^7.1.3

Since Jan 16Pushed 4y ago3 watchersCompare

[ Source](https://github.com/IndraGunawan/facade-bundle)[ Packagist](https://packagist.org/packages/indragunawan/facade-bundle)[ RSS](/packages/indragunawan-facade-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

FacadeBundle
============

[](#facadebundle)

[![license](https://camo.githubusercontent.com/e3870f97cb12ae59fb2b24d6cb0b836223f40d0c0e2f8cadd08a8736298aea3d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f496e64726147756e6177616e2f6661636164652d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://github.com/IndraGunawan/facade-bundle/blob/master/LICENSE.md)[![Travis](https://camo.githubusercontent.com/4c148a44e6f2e229bd8f2350c5e1ff1a23cc97e6f495be68bb188fcbc92e2982/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f496e64726147756e6177616e2f6661636164652d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/IndraGunawan/facade-bundle)[![Scrutinizer Coverage](https://camo.githubusercontent.com/f0019adb457f87ca406ad110940ee2409ea11eaf7621935535b31564fabce947/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f496e64726147756e6177616e2f6661636164652d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/IndraGunawan/facade-bundle/?branch=master)[![Scrutinizer](https://camo.githubusercontent.com/0a0e91524b112cc801ec2f0ffdb0d2e0219fba37579c799ce669d9e0f8ce3bfa/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f496e64726147756e6177616e2f6661636164652d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/IndraGunawan/facade-bundle/?branch=master)[![Source](https://camo.githubusercontent.com/755f50bd9e62b2c631fda867a0ff15f2b5245079419c111778dc76f14d341731/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d496e64726147756e6177616e2532466661636164652d2d62756e646c652d626c75652e737667)](https://github.com/IndraGunawan/facade-bundle)[![Packagist](https://camo.githubusercontent.com/068b0194d5264b90956c7e69819b5cbe02e20599e7662d320c0d3121d38dcfac/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7061636b61676973742d696e64726167756e6177616e2532466661636164652d2d62756e646c652d626c75652e737667)](https://packagist.org/packages/indragunawan/facade-bundle)

Support Facades for Symfony service.

thanks to:

- [Service Locator](https://symfony.com/blog/new-in-symfony-3-3-service-locators) - for making all the referenced facade service lazy-loaded.
- [Service Autoconfiguration](https://symfony.com/blog/new-in-symfony-3-3-service-autoconfiguration) - for making all classes that extend `Indragunawan\FacadeBundle\AbstractFacade` class automatically tagged as facade.

Documentation
-------------

[](#documentation)

- [Installation](#installation)
- [Creating Facade](#creating-facade)

### Installation

[](#installation)

If your project already uses Symfony Flex, execute this command to download, register and configure the bundle automatically:

```
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

### Creating Facade

[](#creating-facade)

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.

```
