https://github.com/indragunawan/facade-bundle
Support Facades for Symfony service
https://github.com/indragunawan/facade-bundle
facades php symfony symfony-bundle
Last synced: 10 days ago
JSON representation
Support Facades for Symfony service
- Host: GitHub
- URL: https://github.com/indragunawan/facade-bundle
- Owner: IndraGunawan
- License: mit
- Created: 2018-01-12T04:36:06.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-06-13T10:41:18.000Z (about 3 years ago)
- Last Synced: 2025-07-01T06:45:47.148Z (15 days ago)
- Topics: facades, php, symfony, symfony-bundle
- Language: PHP
- Homepage:
- Size: 16.6 KB
- Stars: 17
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# FacadeBundle
[](https://github.com/IndraGunawan/facade-bundle/blob/master/LICENSE.md)
[](https://travis-ci.org/IndraGunawan/facade-bundle)
[](https://scrutinizer-ci.com/g/IndraGunawan/facade-bundle/?branch=master)
[](https://scrutinizer-ci.com/g/IndraGunawan/facade-bundle/?branch=master)
[](https://github.com/IndraGunawan/facade-bundle)
[](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
- [Installation](#installation)
- [Creating Facade](#creating-facade)### Installation
If your project already uses Symfony Flex, execute this command to
download, register and configure the bundle automatically:```bash
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
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.
```php