public function readProperties($config = null, $filter = null)
    {
        if(is_null($config))
            $config = file_get_contents($this->configFileLocation);

        $props = preg_match_all('/\s*\$properties\[[\'\"]([^\"^\']+)[\'\"]\]\s*=\s*(.*?);[\n\r\t]?/s', $config, $m);

        $config = array();

        foreach ($m[1] as $i => $key) {
            if ($filter == null || stripos($key, $filter) !== false || stripos($m[2][$i], $filter) !== false)
                $config[(string)$key] = (string)$m[2][$i];
        }

        return $config;
    }
public function readProperties($config = null, $filter = null)
    {
        if(is_null($config))
            $config = file_get_contents($this->configFileLocation);

        $props = preg_match_all('/\s*\$properties\[[\'\"]([^\"^\']+)[\'\"]\]\s*=\s*(.*?);[\n\r\t]?/s', $config, $m);

        $config = array();

        foreach ($m[1] as $i => $key) {
            if ($filter == null || stripos($key, $filter) !== false || stripos($m[2][$i], $filter) !== false)
                $config[(string)$key] = (string)$m[2][$i];
        }

        return $config;
    }
public function readProperties ( $ config = null , $ filter = null ) { if ( is_null ( $ config ) ) $ config = file_get_contents ( $ this -> configFileLocation ) ; $ props = preg_match_all ( '/\s*\$properties\[[\'\"]([^\"^\']+)[\'\"]\]\s*=\s*(.*?);[\n\r\t]?/s' , $ config , $ m ) ; $ config = array ( ) ; foreach ( $ m [ 1 ] as $ i => $ key ) { if ( $ filter == null || stripos ( $ key , $ filter ) !== false || stripos ( $ m [ 2 ] [ $ i ] , $ filter ) !== false ) $ config [ ( string ) $ key ] = ( string ) $ m [ 2 ] [ $ i ] ; } return $ config ; }
Parses the properties file.

NOTE: Even though the properties file looks like php, and ends in a .php extension,
we just parse it out all by hand here.

@param string $config The contents of the config file to parse.
If not specified, it will use the config file from $this->configFileLocation
@param string $filter If specified, no config items with this in the name will be returned

@return array Returns an array of the config properties.
Parses the properties file .