PHP code example of sassnowski / yii-provider-registry
1. Go to this page and download the library: Download sassnowski/yii-provider-registry 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/ */
sassnowski / yii-provider-registry example snippets
$app = new yii\web\Application($config)
(new \Sassnowski\Yii2\ProviderRegistry\ProviderRegistry(\Yii::$container))->bootstrap();
$app->run();
namespace Acme\Providers;
use yii\di\Container;
class MyProvider
{
public function bootstrap(Container $container)
{
$container->set(
\Acme\Services\MySickServiceInterface::class,
\Acme\Services\MySickServiceImplementation::class
);
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.