Skip to content

Commit

Permalink
[Config] Renaming NodeBuilder::nodeBuilder() to NodeBuilder::builder(…
Browse files Browse the repository at this point in the history
…) due to the fact that PHP can get confused when you have a __construct() method *and* a method that has the same name as the class (looks like two constructors to PHP).
  • Loading branch information
weaverryan committed Feb 18, 2011
1 parent ea768fe commit d6617f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -116,7 +116,7 @@ public function node($name, $type)
*
* @return Symfony\Component\DependencyInjection\Configuration\Builder\NodeBuilder This builder node
*/
public function nodeBuilder(NodeBuilder $node)
public function builder(NodeBuilder $node)
{
$node->parent = $this;

Expand Down
Expand Up @@ -11,7 +11,7 @@ public function testNodeBuilder()
$nodeBuilder = new NodeBuilder('root', array());
$childNode = new NodeBuilder('child', array());

$ret = $nodeBuilder->nodeBuilder($childNode);
$ret = $nodeBuilder->builder($childNode);
$this->assertEquals(array('child' => $childNode), $nodeBuilder->children);
$this->assertEquals($nodeBuilder, $ret);
}
Expand Down

0 comments on commit d6617f6

Please sign in to comment.