PHP code example of xenokore / component-loader
1. Go to this page and download the library: Download xenokore/component-loader 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/ */
xenokore / component-loader example snippets
$component_loader = new Xenokore\ComponentLoader\Loader('/vendor');
// When using PHP-DI
$builder = new DI\ContainerBuilder();
$builder->useAnnotations(true);
$builder->useAutowiring(true);
$builder->addDefinitions(
$component_loader->getContainerDefinitions()
);