Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Preusner committed Dec 12, 2013
1 parent 5eb2dc7 commit 56f11f6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
15 changes: 10 additions & 5 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,22 @@
* Configuration
*
* @package EightPoints\Bundle\GuzzleBundle\DependencyInjection
*
* @copyright 8points IT
* @author Florian Preusner
*
* @version 1.0
* @since 2013-10
*/
class Configuration implements ConfigurationInterface {

/**
* @var string $alias
*/
protected $alias;

/**
* @var boolean $debug
*/
private $debug;
protected $debug;

/**
* Constructor
Expand All @@ -30,10 +33,12 @@ class Configuration implements ConfigurationInterface {
* @version 1.0
* @since 2013-10
*
* @param string $alias
* @param boolean $debug
*/
public function __construct($debug = false) {
public function __construct($alias, $debug = false) {

$this->alias = $alias;
$this->debug = (boolean) $debug;
} // end: __construct

Expand All @@ -49,7 +54,7 @@ public function __construct($debug = false) {
public function getConfigTreeBuilder() {

$builder = new TreeBuilder();
$builder->root('guzzle')
$builder->root($this->alias)
->children()
->scalarNode('base_url')->defaultValue(null)->end()

Expand Down
4 changes: 1 addition & 3 deletions DependencyInjection/GuzzleExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
* GuzzleExtension
*
* @package EightPoints\Bundle\GuzzleBundle\DependencyInjection
*
* @copyright 8points IT
* @author Florian Preusner
*
* @version 1.0
Expand Down Expand Up @@ -41,7 +39,7 @@ public function load(array $configs, ContainerBuilder $container) {
$loader->load('services.xml');

$processor = new Processor();
$configuration = new Configuration($container->getParameter('kernel.debug'));
$configuration = new Configuration($this->getAlias(), $container->getParameter('kernel.debug'));
$config = $processor->processConfiguration($configuration, $configs);

$container->setParameter('guzzle.base_url', $config['base_url']);
Expand Down
2 changes: 0 additions & 2 deletions EventListener/HeaderSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
* Adds headers to request
*
* @package EightPoints\Bundle\GuzzleBundle\EventListener
*
* @copyright 8points IT
* @author Florian Preusner
*
* @version 1.0
Expand Down
2 changes: 0 additions & 2 deletions GuzzleBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
* Class GuzzleBundle
*
* @package EightPoints\Bundle\GuzzleBundle
*
* @copyright 8points IT
* @author Florian Preusner
*
* @version 1.0
Expand Down

0 comments on commit 56f11f6

Please sign in to comment.