Skip to content

Commit

Permalink
change namespace from GHub to Pomm and make bundle class name just Po…
Browse files Browse the repository at this point in the history
…mmBundle
  • Loading branch information
kcivey committed Aug 27, 2012
1 parent 79b19da commit 6c9c88d
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 27 deletions.
2 changes: 1 addition & 1 deletion Command/BaseCreateCommand.php
@@ -1,6 +1,6 @@
<?php

namespace GHub\PommBundle\Command;
namespace Pomm\PommBundle\Command;

use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;

Expand Down
2 changes: 1 addition & 1 deletion Command/CreateBaseMapCommand.php
@@ -1,6 +1,6 @@
<?php

namespace GHub\PommBundle\Command;
namespace Pomm\PommBundle\Command;

use Symfony\Bundle\FrameworkBundle\Command\Command;

Expand Down
2 changes: 1 addition & 1 deletion Command/ScanSchemaCommand.php
@@ -1,6 +1,6 @@
<?php

namespace GHub\PommBundle\Command;
namespace Pomm\PommBundle\Command;

use Symfony\Bundle\FrameworkBundle\Command\Command;

Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/Configuration.php
@@ -1,6 +1,6 @@
<?php

namespace GHub\PommBundle\DependencyInjection;
namespace Pomm\PommBundle\DependencyInjection;

use Symfony\Component\Config\Definition\Builder\TreeBuilder,
Symfony\Component\Config\Definition\ConfigurationInterface;
Expand All @@ -18,7 +18,7 @@ class Configuration implements ConfigurationInterface
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('g_hub_pomm');
$rootNode = $treeBuilder->root('pomm');

$rootNode
->beforeNormalization()
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace GHub\PommBundle\DependencyInjection;
namespace Pomm\PommBundle\DependencyInjection;

use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
Expand All @@ -11,7 +11,7 @@
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Reference;

class GHubPommExtension implements ExtensionInterface
class PommExtension implements ExtensionInterface
{
/**
* Loads the bundle configuration.
Expand Down Expand Up @@ -77,7 +77,7 @@ public function getNamespace()
*/
public function getAlias()
{
return 'g_hub_pomm';
return 'pomm';
}
}

9 changes: 0 additions & 9 deletions GHubPommBundle.php

This file was deleted.

9 changes: 9 additions & 0 deletions PommBundle.php
@@ -0,0 +1,9 @@
<?php

namespace Pomm\PommBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class PommBundle extends Bundle
{
}
16 changes: 6 additions & 10 deletions README.rst
Expand Up @@ -28,7 +28,7 @@ To use PommBundle, you must clone the bundle_ in the *src* directory of your sf2

$ git clone https://github.com/chanmix51/Pomm vendor/pomm
...
$ git clone https://github.com/chanmix51/PommBundle vendor/bundles/GHub
$ git clone https://github.com/chanmix51/PommBundle vendor/bundles/Pomm

You might prefer `downloading an archive`__ of the Pomm bundle. Simply unzip it in your *src* directory.

Expand All @@ -46,18 +46,18 @@ If you are using the deps file to manage your project's dependencies, you must a
git=https://github.com/chanmix51/Pomm.git
target=/pomm
[GHubPommBundle]
[PommPommBundle]
git=https://github.com/chanmix51/PommBundle.git
target=/bundles/GHub/PommBundle
target=/bundles/Pomm/PommBundle

You have now to tell Symfony2 autoloader where to find the API and the files that will be generated. Fire up your text editor and add the following lines to the *app/autoload.php* file:

::

#app/autoload.php

'Pomm/PommBundle' => __DIR__.'/../vendor/bundles/Pomm',
'Pomm' => __DIR__.'/../vendor/pomm',
'GHub' => __DIR__.'/../vendor/bundles',
# This is the default namespace for the model
# But it can be changed see the command line tools
'Model' => __DIR__.'/..',
Expand All @@ -68,14 +68,14 @@ Let's register the PommBundle in the application kernel:

#app/AppKernel.php
// register your bundles
new GHub\PommBundle\GHubPommBundle(),
new Pomm\PommBundle\PommBundle(),

You can now define your database settings in your main configuration file. The example below uses the yaml format:

::

# app/config/config.yml
g_hub_pomm:
pomm:
databases:
cnct_name:
dsn: pgsql://user:password@host:port/dbname
Expand Down Expand Up @@ -211,7 +211,3 @@ Another example calling a custom model function from a database named *foo*:
Pomm also make you benefit from Postgresql's nice transaction mechanism, see the `Pomm's online documentation`_.

.. _Pomm's online documentation : http://pomm.coolkeums.org/documentation




0 comments on commit 6c9c88d

Please sign in to comment.