for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Noodlehaus\FileParser;
use Noodlehaus\Exception\ParseException;
/**
* INI file parser
*
* @package Config
* @author Jesus A. Domingo <[email protected]>
* @author Hassan Khan <[email protected]>
* @link https://github.com/noodlehaus/config
* @license MIT
*/
class Ini implements FileParserInterface
{
* {@inheritDoc}
* Parses an INI file as an array
* @throws ParseException If there is an error parsing the INI file
public function parse($path)
$data = @parse_ini_file($path, true);
if (!$data) {
$error = error_get_last();
throw new ParseException($error);
}
return $data;
public function getSupportedExtensions()
return array('ini');