PHP code example of hylianshield / vendor-locator-bundle

1. Go to this page and download the library: Download hylianshield/vendor-locator-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/ */

    

hylianshield / vendor-locator-bundle example snippets



use HylianShield\VendorLocatorBundle\HylianShieldVendorLocatorBundle;

//...
class AppKernel extends Kernel
{
    // ...
    public function registerBundles()
    {
        $bundles = [
            // ...
            new HylianShieldVendorLocatorBundle()
        ];
        // ...
    }
    // ...
}


/** @var \Symfony\Component\Config\FileLocatorInterface $locator */
$locator = $this->get('hylianshield.file_locator.vendor');

echo $locator->locate('hylianshield/vendor-locator-bundle');