public function readFile($filename)
    {
        if (!is_string($filename))
            throw new IniReadingException('The expected type is string');

        if (!file_exists($filename) || !is_readable($filename))
            throw new IniReadingException(sprintf("The file %s doesn't exist or is not readable", $filename));

        if (function_exists('file_get_contents')) {
            $ini = file_get_contents($filename);
        } elseif (function_exists('file')) {
            $ini = file($filename);
            if ($ini !== false)
                $ini = implode("\n", $ini);
        } elseif (function_exists('fopen') && function_exists('fread')) {
            $handle = fopen($filename, 'r');
            if (!$handle)
                return false;
            $ini = fread($handle, filesize($filename));
            fclose($handle);
        } else {
            return false;
        }

        if ($ini === false)
            throw new IniReadingException(sprintf('Impossible to read the file %s', $filename));

        return $this->readString($ini);
    }