public function buildConnectionNode($rootName, $isArray)
    {
        $treeBuilder = new TreeBuilder();
        $connectionNode = $treeBuilder->root($rootName);
        if ($isArray) {
            /** @var ArrayNodeDefinition $connectionNodePrototype */
            $connectionNodePrototype = $connectionNode->prototype('array');
            $connectionNodeBuilder = $connectionNodePrototype->children();
        } else {
            $connectionNodeBuilder = $connectionNode->children();
        }

        $connectionNodeBuilder->scalarNode('driver')
            ->defaultValue('mysql');

        $connectionNodeBuilder->scalarNode('user')
            ->defaultValue('root');

        $connectionNodeBuilder->scalarNode('password')
            ->defaultValue('');

        $connectionNodeBuilder->scalarNode('dsn')
            ->cannotBeEmpty();

        $connectionNodeBuilder->scalarNode('classname')
            ->defaultValue('\Propel\Runtime\Connection\ConnectionWrapper');

        return $connectionNode;
    }
public function buildConnectionNode($rootName, $isArray)
    {
        $treeBuilder = new TreeBuilder();
        $connectionNode = $treeBuilder->root($rootName);
        if ($isArray) {
            /** @var ArrayNodeDefinition $connectionNodePrototype */
            $connectionNodePrototype = $connectionNode->prototype('array');
            $connectionNodeBuilder = $connectionNodePrototype->children();
        } else {
            $connectionNodeBuilder = $connectionNode->children();
        }

        $connectionNodeBuilder->scalarNode('driver')
            ->defaultValue('mysql');

        $connectionNodeBuilder->scalarNode('user')
            ->defaultValue('root');

        $connectionNodeBuilder->scalarNode('password')
            ->defaultValue('');

        $connectionNodeBuilder->scalarNode('dsn')
            ->cannotBeEmpty();

        $connectionNodeBuilder->scalarNode('classname')
            ->defaultValue('\Propel\Runtime\Connection\ConnectionWrapper');

        return $connectionNode;
    }
public function buildConnectionNode ( $ rootName , $ isArray ) { $ treeBuilder = new TreeBuilder ( ) ; $ connectionNode = $ treeBuilder -> root ( $ rootName ) ; if ( $ isArray ) { /** @var ArrayNodeDefinition $connectionNodePrototype */ $ connectionNodePrototype = $ connectionNode -> prototype ( 'array' ) ; $ connectionNodeBuilder = $ connectionNodePrototype -> children ( ) ; } else { $ connectionNodeBuilder = $ connectionNode -> children ( ) ; } $ connectionNodeBuilder -> scalarNode ( 'driver' ) -> defaultValue ( 'mysql' ) ; $ connectionNodeBuilder -> scalarNode ( 'user' ) -> defaultValue ( 'root' ) ; $ connectionNodeBuilder -> scalarNode ( 'password' ) -> defaultValue ( '' ) ; $ connectionNodeBuilder -> scalarNode ( 'dsn' ) -> cannotBeEmpty ( ) ; $ connectionNodeBuilder -> scalarNode ( 'classname' ) -> defaultValue ( '\Propel\Runtime\Connection\ConnectionWrapper' ) ; return $ connectionNode ; }
Build a configuration node describing one or more database connection
@param string $rootName Node name.
@param bool $isArray Whether the node is a single connection or an array of connections.
@return ArrayNodeDefinition|NodeDefinition Connection(s) node.
Build a configuration node describing one or more database connection