public function __construct($filename, $container) { parent::__construct($container, $filename); if (!$this->checkFile($this->_filename)) { throw new \Exception("File does not exist or file is too big"); } $this->_filename = $filename; $this->load(); }
public function __construct($filename, ContainerInterface $container) { parent::__construct($container, $filename); if (!$this->checkFile()) { throw new \Exception("File does not exist or file is too big"); } $this->_xml = new \DOMDocument('1.0', 'utf-8'); $this->_xml->load($filename); if (false === $this->_xml) { throw new \Exception("Error on load XML file " . $filename); } }
public function __construct($filename, $container) { parent::__construct($container, $filename); if (!$this->checkFile()) { throw new \Exception("File does not exist or file is too big"); } $this->_objExcel = \PHPExcel_IOFactory::load($filename); if ($this->_objExcel === false) { throw new \Exception("Error on load PHPExcel_IOFactory. The file " . $filename); } $this->_objWorksheet = $this->_objExcel->getActiveSheet(); }
public function __construct($filename, $container) { parent::__construct($container, $filename); $this->_filename = $filename; $this->load(); }