Source of file ContainerExtension.php
Size: 1,770 Bytes - Last Modified: 2021-12-24T06:51:36+00:00
/var/www/docs.ssmods.com/process/src/src/DependencyInjection/ContainerExtension.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 | <?php namespace Heystack\Core\DependencyInjection; use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; /** * Container extension for Heystack. * * If Heystacks services are loaded as an extension (this happens when there is * a primary services.yml file in mysite/config) then this is the container * extension that loads heystacks services.yml * * @copyright Heyday * @author Cam Spiers <cameron@heyday.co.nz> * @author Glenn Bautista <glenn@heyday.co.nz> * @package Heystack */ class ContainerExtension implements ExtensionInterface { const IDENTIFIER = 'heystack'; /** * Loads a services.yml file into a fresh container, ready to me merged * back into the main container * * @param array $config * @param ContainerBuilder $container * @return null */ public function load(array $config, ContainerBuilder $container) { (new YamlFileLoader( $container, new FileLocator(HEYSTACK_BASE_PATH . '/config/') ))->load('services.yml'); } /** * Returns the namespace of the container extension * @return string */ public function getNamespace() { return self::IDENTIFIER; } /** * Returns Xsd Validation Base Path, which is not used, so false * @return boolean */ public function getXsdValidationBasePath() { return false; } /** * Returns the container extensions alias * @return string */ public function getAlias() { return self::IDENTIFIER; } } |