PHP code example of bnf / service-provider-bridge-bundle

1. Go to this page and download the library: Download bnf/service-provider-bridge-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bnf / service-provider-bridge-bundle example snippets


    public function registerBundles()
    {
        $bundles = [
            ...
            new \Bnf\Interop\ServiceProviderBridgeBundle\InteropServiceProviderBridgeBundle()
        ];
        ...
    }

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = [
            ...
            new \Bnf\Interop\ServiceProviderBridgeBundle\InteropServiceProviderBridgeBundle([
                new MyServiceProvide1(),
                new MyServiceProvide2()
            ])
        ];
        ...
    }
}

    public function registerBundles()
    {
        $bundles = [
            ...
            new \Bnf\Interop\ServiceProviderBridgeBundle\InteropServiceProviderBridgeBundle([
                MyServiceProvide1::class,
                MyServiceProvide2::class
            ])
        ];
        ...
    }

    public function registerBundles()
    {
        $bundles = [
            ...
            new \Bnf\Interop\ServiceProviderBridgeBundle\InteropServiceProviderBridgeBundle([
                [ MyServiceProvide1::class, [ "param1", "param2" ] ],
                [ MyServiceProvide2::class, [ 42 ] ],
            ])
        ];
        ...
    }