PHP code example of samburns / pimple3-containerinterop
1. Go to this page and download the library: Download samburns/pimple3-containerinterop 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/ */
samburns / pimple3-containerinterop example snippets
use Pimple\Container as PimpleContainer;
use SamBurns\Pimple3ContainerInterop\ServiceContainer;
$rawPimpleContainer = new PimpleContainer();
$rawPimpleContainer['service-id'] = function () {return new \Whatever();};
$container = ServiceContainer($rawPimpleContainer);
use SamBurns\Pimple3ContainerInterop\ServiceContainer;
use My\ServiceProvider;
$container = new ServiceContainer();
$container->addConfig(new ServiceProvider());
use SamBurns\Pimple3ContainerInterop\ServiceContainer;
use My\ServiceProvider;
$container = ServiceContainer::constructConfiguredWith(new ServiceProvider());