PHP code example of proklung / container-locator-bundle
1. Go to this page and download the library: Download proklung/container-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/ */
proklung / container-locator-bundle example snippets
function container($classContainer = ContainerLocator::class)
{
$container = $classContainer::instance();
if ($container === null) {
throw new RuntimeException(
'Service container '. is_object($classContainer) ? get_class($classContainer) : $classContainer.
' not initialized.'
);
}
return $container;
}