/** * @param string $file * @throws Exception If file does not exist or is not readable */ public function __construct($file) { $this->_file = $file; if (!file_exists($file) || !is_file($file) || !is_readable($file)) { throw new \Exception('Unable to open file for reading: ' . $file); } parent::__construct(file_get_contents($file)); }