Skip to content

Commit

Permalink
Updated dependencies (removed elcodi/core-bundle)
Browse files Browse the repository at this point in the history
* Updated extension
  • Loading branch information
mmoreram committed May 5, 2015
1 parent 688820b commit 9082db5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 41 deletions.
64 changes: 24 additions & 40 deletions DependencyInjection/VisithorExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,62 +13,46 @@

namespace Visithor\Bundle\DependencyInjection;

use Elcodi\Bundle\CoreBundle\DependencyInjection\Abstracts\AbstractExtension;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;

/**
* Class VisithorExtension
*/
class VisithorExtension extends AbstractExtension
class VisithorExtension extends Extension
{
/**
* @var string
* Loads a specific configuration.
*
* Extension name
*/
const EXTENSION_NAME = 'visithor';

/**
* Get the Config file location
*
* @return string Config file location
*/
public function getConfigFilesLocation()
{
return __DIR__ . '/../Resources/config';
}

/**
* Config files to load
* @param array $config An array of configuration values
* @param ContainerBuilder $container A ContainerBuilder instance
*
* return array(
* 'file1.yml',
* 'file2.yml',
* ...
* );
* @throws \InvalidArgumentException When provided tag is not defined in this extension
*
* @param array $config Config
*
* @return array Config files
* @api
*/
public function getConfigFiles(array $config)
public function load(array $config, ContainerBuilder $container)
{
return [
'clients',
'commands',
'executors',
'factories',
'generators',
'renderers',
];
$loader = new YamlFileLoader(
$container, new
FileLocator(__DIR__.'/../Resources/config')
);

$loader->load('clients.yml');
$loader->load('commands.yml');
$loader->load('factories.yml');
$loader->load('generators.yml');
$loader->load('executors.yml');
$loader->load('renderers.yml');
}

/**
* Returns the extension alias, same value as extension name
*
* @return string The alias
* @return string
*/
public function getAlias()
{
return self::EXTENSION_NAME;
return 'visithor';
}
}
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"symfony/http-foundation": "~2.3",
"symfony/security": "~2.3",
"symfony/framework-bundle": "~2.3",
"elcodi/core-bundle": "~0.5.0",

"visithor/visithor": "~0.1, >=0.1.2"
},
Expand Down

0 comments on commit 9082db5

Please sign in to comment.