All Projects → IndraGunawan → facade-bundle

IndraGunawan / facade-bundle

Licence: MIT license
Support Facades for Symfony service

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to facade-bundle

jsonrpc-bundle
JSON-RPC server for Symfony: exposes services registered in the service container as JSON-RPC-webservices
Stars: ✭ 31 (+82.35%)
Mutual labels:  symfony-bundle
RapidFormBundle
Create Symfony forms at record speed using PHP 8 attributes!
Stars: ✭ 33 (+94.12%)
Mutual labels:  symfony-bundle
awsBundle
Symfony AWS Bundle (supports Symfony 2, 3 and 4)
Stars: ✭ 18 (+5.88%)
Mutual labels:  symfony-bundle
hashed-asset-bundle
Apply an asset version based on a hash of the asset for symfony/asset
Stars: ✭ 24 (+41.18%)
Mutual labels:  symfony-bundle
NucleosDompdfBundle
📜 This bundle provides a wrapper for using dompdf inside symfony.
Stars: ✭ 29 (+70.59%)
Mutual labels:  symfony-bundle
CoopTilleulsSyliusClickNCollectPlugin
Sell and deliver securely during the COVID-19 pandemic!
Stars: ✭ 77 (+352.94%)
Mutual labels:  symfony-bundle
PRRecaptchaBundle
Recaptcha v3 bundle for Symfony
Stars: ✭ 14 (-17.65%)
Mutual labels:  symfony-bundle
socketio
No description or website provided.
Stars: ✭ 23 (+35.29%)
Mutual labels:  symfony-bundle
symbok-bundle
Symfony annotations bundle
Stars: ✭ 50 (+194.12%)
Mutual labels:  symfony-bundle
breadcrumb-bundle
Symfony bundle for easy breadcrumbs management
Stars: ✭ 26 (+52.94%)
Mutual labels:  symfony-bundle
hashids-bundle
Integrates hashids/hashids in a Symfony project
Stars: ✭ 43 (+152.94%)
Mutual labels:  symfony-bundle
connect-bundle
No description or website provided.
Stars: ✭ 35 (+105.88%)
Mutual labels:  symfony-bundle
CmsBundle
Super-lightweight CMS bundle for Symfony
Stars: ✭ 52 (+205.88%)
Mutual labels:  symfony-bundle
EasyAdminPlusBundle
EasyAdminPlusBundle is a Symfony 4 wrapper for the amazing EasyCorp/EasyAdminBundle
Stars: ✭ 39 (+129.41%)
Mutual labels:  symfony-bundle
firebase-bundle
A Symfony Bundle for the Firebase PHP Admin SDK
Stars: ✭ 112 (+558.82%)
Mutual labels:  symfony-bundle
LiipImagineSerializationBundle
Provides integration between LiipImagineBundle and JMSSerializerBundle
Stars: ✭ 24 (+41.18%)
Mutual labels:  symfony-bundle
WhiteOctoberSwiftMailerDBBundle
A bundle to facilitate SwiftMailer spooling messages to a database
Stars: ✭ 31 (+82.35%)
Mutual labels:  symfony-bundle
phpfastcache-bundle
The symfony 3/Flex bundle for PhpFastCache integrating a phpfastcache service, a twig cache tag and a powerfull cache profiler integrated to the symfony profile
Stars: ✭ 19 (+11.76%)
Mutual labels:  symfony-bundle
BeelabTagBundle
🏷 A simple implementation of tags for Symfony and Doctrine ORM
Stars: ✭ 45 (+164.71%)
Mutual labels:  symfony-bundle
LiipSoapRecorderBundle
[DEPRECATED] Recorder/Player for SOAP communications
Stars: ✭ 12 (-29.41%)
Mutual labels:  symfony-bundle

FacadeBundle

license Travis Scrutinizer Coverage Scrutinizer Source Packagist

Support Facades for Symfony service.

thanks to:

  • Service Locator - for making all the referenced facade service lazy-loaded.
  • Service Autoconfiguration - for making all classes that extend Indragunawan\FacadeBundle\AbstractFacade class automatically tagged as facade.

Documentation

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

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

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.

License

This bundle is under the MIT license. See the complete license

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].