* @param string $filename [description] */ public function __construct(string $filename) { $this->filename = $filename; if (!is_readable($filename)) { throw new Exception('Cannot read from file: ' . $filename); } $this->load; } /** * Load the file * * @author Phil Burton */ public function load() { $this->file = file_get_contents($this->filename); } /** * Parse file and return array * * @author Phil Burton * @return array */ public function getVendorArray(): array { if (!$this->array) { $this->array = []; } return $this->array; } }