concrete/src/Config/DatabaseLoader.php
public function load($environment, $group, $namespace = null)
    {
        $result = array();

        $db = Database::getActiveConnection();
        $query = $db->createQueryBuilder();

        $query
            ->select('configValue', 'configItem')
            ->from('Config', 'c')
            ->where('configGroup = ?')
            ->setParameter(0, $group);

        if ($namespace) {
            $query->andWhere('configNamespace = ?')->setParameter(1, $namespace);
        } else {
            $query->andWhere('configNamespace = ? OR configNamespace IS NULL')->setParameter(1, '');
        }

        $results = $query->execute();

        while ($row = $results->fetch()) {
            array_set($result, $row['configItem'], $row['configValue']);
        }

        return $result;
    }
public function load($environment, $group, $namespace = null)
    {
        $result = array();

        $db = Database::getActiveConnection();
        $query = $db->createQueryBuilder();

        $query
            ->select('configValue', 'configItem')
            ->from('Config', 'c')
            ->where('configGroup = ?')
            ->setParameter(0, $group);

        if ($namespace) {
            $query->andWhere('configNamespace = ?')->setParameter(1, $namespace);
        } else {
            $query->andWhere('configNamespace = ? OR configNamespace IS NULL')->setParameter(1, '');
        }

        $results = $query->execute();

        while ($row = $results->fetch()) {
            array_set($result, $row['configItem'], $row['configValue']);
        }

        return $result;
    }
public function load ( $ environment , $ group , $ namespace = null ) { $ result = array ( ) ; $ db = Database :: getActiveConnection ( ) ; $ query = $ db -> createQueryBuilder ( ) ; $ query -> select ( 'configValue' , 'configItem' ) -> from ( 'Config' , 'c' ) -> where ( 'configGroup = ?' ) -> setParameter ( 0 , $ group ) ; if ( $ namespace ) { $ query -> andWhere ( 'configNamespace = ?' ) -> setParameter ( 1 , $ namespace ) ; } else { $ query -> andWhere ( 'configNamespace = ? OR configNamespace IS NULL' ) -> setParameter ( 1 , '' ) ; } $ results = $ query -> execute ( ) ; while ( $ row = $ results -> fetch ( ) ) { array_set ( $ result , $ row [ 'configItem' ] , $ row [ 'configValue' ] ) ; } return $ result ; }
Load the given configuration group. Because it's the database, we ignore the environment.

@param  string $environment
@param  string $group
@param  string $namespace

@return array
Load the given configuration group . Because it s the database we ignore the environment .