1. Go to this page and download the library: Download theorx/sdic 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/ */
theorx / sdic example snippets
$container = new \Theorx\SDIC\SDIC();
//Register single dependency
$container->register(DependencyClassInterface::class, function(Theorx\SDIC\SDIC $container) {
return new DependencyClass($container->get(DependencyClassDependency::class));
});
/**
* Used for creating shared instances
*
* @author Lauri Orgla <[email protected]>
*
* @param string $name
* @param callable $callback
*
* @return mixed
*/
/**
* Load container extension which is instance of class that implements SDICExtension
*
* @author Lauri Orgla <[email protected]>
*
* @param SDICExtension $extension
*/
/**
* Loads a set of extensions
*
* @author Lauri Orgla <[email protected]>
*
* @param array $extensions
*/
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.