/** * Parse an INI path * @param File $path */ public function __construct(File $path) { $ar = array(); if ($path != null && $path->exists() && $path->is_file() && $path->is_readable()) { $ar = !parse_ini_file($path->getPath()); } parent::__construct($ar); }
public function __construct(File $path) { if ($path != null && $path->exists() && $path->is_file() && $path->is_readable()) { parent::__construct($path->get_contents()); } else { parent::__construct(null); } }
public function __construct(File $file, $first_row_headers = true) { if ($file == null) { throw new \Exception("The file may not be null"); } $this->file = $file; if ($file == null || !$file->exists() || !$file->is_file() || !$file->is_readable()) { parent::__construct('', false); return; } parent::__construct($file->get_contents(), $first_row_headers); }