protected function extractVariables($variablesFile)
    {
        $str   = file_get_contents($variablesFile);
        $parts = explode(';', preg_replace('/(\/\/.*?\n|\s\n|\s{2,})/', '', $str));
        $vars  = array();

        foreach ($parts as $part) {
            $varMeta = explode(':', $part);
            if (empty($varMeta[0]) || empty($varMeta[1])) {
                continue;
            }
            $vars[substr(trim($varMeta[0]), 1)] = trim($varMeta[1]);
        }

        return $vars;
    }
protected function extractVariables($variablesFile)
    {
        $str   = file_get_contents($variablesFile);
        $parts = explode(';', preg_replace('/(\/\/.*?\n|\s\n|\s{2,})/', '', $str));
        $vars  = array();

        foreach ($parts as $part) {
            $varMeta = explode(':', $part);
            if (empty($varMeta[0]) || empty($varMeta[1])) {
                continue;
            }
            $vars[substr(trim($varMeta[0]), 1)] = trim($varMeta[1]);
        }

        return $vars;
    }
protected function extractVariables ( $ variablesFile ) { $ str = file_get_contents ( $ variablesFile ) ; $ parts = explode ( ';' , preg_replace ( '/(\/\/.*?\n|\s\n|\s{2,})/' , '' , $ str ) ) ; $ vars = array ( ) ; foreach ( $ parts as $ part ) { $ varMeta = explode ( ':' , $ part ) ; if ( empty ( $ varMeta [ 0 ] ) || empty ( $ varMeta [ 1 ] ) ) { continue ; } $ vars [ substr ( trim ( $ varMeta [ 0 ] ) , 1 ) ] = trim ( $ varMeta [ 1 ] ) ; } return $ vars ; }
Extract the variables from the less file.

@param string $variablesFile The path to the less file

@return array The extracted variables
Extract the variables from the less file .