1. Go to this page and download the library: Download cocur/pli 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/ */
// src/AcmeConfiguration.php
use Symfony\Component\Config\Definition\ConfigurationInterface;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
class BranConfiguration implements ConfigurationInterface
{
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('acme');
return $treeBuilder;
}
}
// src/AcmeExtension.php
use Cocur\Pli\Container\ExtensionInterface;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
class BranExtension implements ExtensionInterface
{
private $configDirectories;
public function buildContainer(ContainerBuilder $container, array $config = [])
{
$loader = new YamlFileLoader($container, new FileLocator($this->configDirectories));
$loader->load('services.yml');
}
public function setConfigDirectories(array $configDirectories)
{
$this->configDirectories = $configDirectories;
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.