lib/IniModifier.php
public function getValues($section = 0)
    {
        if (!isset($this->content[$section])) {
            return array();
        }
        $values = array();
        foreach ($this->content[$section] as $k => $item) {
            if ($item[0] != self::TK_VALUE && $item[0] != self::TK_ARR_VALUE) {
                continue;
            }

            if (preg_match('/^-?[0-9]$/', $item[2])) {
                $val = intval($item[2]);
            } elseif (preg_match('/^-?[0-9\.]$/', $item[2])) {
                $val = floatval($item[2]);
            } elseif (strtolower($item[2]) === 'true' || strtolower($item[2]) === 'on') {
                $val = true;
            } elseif (strtolower($item[2]) === 'false' || strtolower($item[2]) === 'off') {
                $val = false;
            } else {
                $val = $item[2];
            }

            if ($item[0] == self::TK_VALUE) {
                $values[$item[1]] = $val;
            } else {
                $values[$item[1]][$item[3]] = $val;
            }
        }

        return $values;
    }
public function getValues($section = 0)
    {
        if (!isset($this->content[$section])) {
            return array();
        }
        $values = array();
        foreach ($this->content[$section] as $k => $item) {
            if ($item[0] != self::TK_VALUE && $item[0] != self::TK_ARR_VALUE) {
                continue;
            }

            if (preg_match('/^-?[0-9]$/', $item[2])) {
                $val = intval($item[2]);
            } elseif (preg_match('/^-?[0-9\.]$/', $item[2])) {
                $val = floatval($item[2]);
            } elseif (strtolower($item[2]) === 'true' || strtolower($item[2]) === 'on') {
                $val = true;
            } elseif (strtolower($item[2]) === 'false' || strtolower($item[2]) === 'off') {
                $val = false;
            } else {
                $val = $item[2];
            }

            if ($item[0] == self::TK_VALUE) {
                $values[$item[1]] = $val;
            } else {
                $values[$item[1]][$item[3]] = $val;
            }
        }

        return $values;
    }
public function getValues ( $ section = 0 ) { if ( ! isset ( $ this -> content [ $ section ] ) ) { return array ( ) ; } $ values = array ( ) ; foreach ( $ this -> content [ $ section ] as $ k => $ item ) { if ( $ item [ 0 ] != self :: TK_VALUE && $ item [ 0 ] != self :: TK_ARR_VALUE ) { continue ; } if ( preg_match ( '/^-?[0-9]$/' , $ item [ 2 ] ) ) { $ val = intval ( $ item [ 2 ] ) ; } elseif ( preg_match ( '/^-?[0-9\.]$/' , $ item [ 2 ] ) ) { $ val = floatval ( $ item [ 2 ] ) ; } elseif ( strtolower ( $ item [ 2 ] ) === 'true' || strtolower ( $ item [ 2 ] ) === 'on' ) { $ val = true ; } elseif ( strtolower ( $ item [ 2 ] ) === 'false' || strtolower ( $ item [ 2 ] ) === 'off' ) { $ val = false ; } else { $ val = $ item [ 2 ] ; } if ( $ item [ 0 ] == self :: TK_VALUE ) { $ values [ $ item [ 1 ] ] = $ val ; } else { $ values [ $ item [ 1 ] ] [ $ item [ 3 ] ] = $ val ; } } return $ values ; }
return all values of a section in the ini file.

@param string $section the section from wich we want values. 0 is the global section

@return array the list of values, $key=>$value
return all values of a section in the ini file .