Skip to content

Commit

Permalink
Changed config root node
Browse files Browse the repository at this point in the history
  • Loading branch information
core23 committed Jan 26, 2018
1 parent 6b0fd81 commit 482be08
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Define the API credentials in your configuration.
```yml
# config.yml

core23_last_fm:
core23_lastfm:
api:
app_id: %lastfm_api.id%
shared_secret: %lastfm_api.secret%
Expand Down
12 changes: 12 additions & 0 deletions src/Core23LastFmBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,20 @@

namespace Core23\LastFmBundle;

use Core23\LastFmBundle\DependencyInjection\Core23LastFmExtension;
use Symfony\Component\HttpKernel\Bundle\Bundle;

final class Core23LastFmBundle extends Bundle
{
/**
* {@inheritdoc}
*/
public function getContainerExtension()
{
if (null === $this->extension) {
$this->extension = new Core23LastFmExtension();
}

return $this->extension;
}
}
2 changes: 1 addition & 1 deletion src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function getConfigTreeBuilder()
$treeBuilder = new TreeBuilder();

/** @var ArrayNodeDefinition $node */
$node = $treeBuilder->root('core23_last_fm');
$node = $treeBuilder->root('core23_lastfm');

$this->addRoutingSection($node);
$this->addApiSection($node);
Expand Down
8 changes: 8 additions & 0 deletions src/DependencyInjection/Core23LastFmExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@

final class Core23LastFmExtension extends Extension
{
/**
* {@inheritdoc}
*/
public function getAlias()
{
return 'core23_lastfm';
}

/**
* {@inheritdoc}
*/
Expand Down

0 comments on commit 482be08

Please sign in to comment.