예제 #1
0
 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();
 }
예제 #2
0
 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);
     }
 }
예제 #3
0
 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();
 }
예제 #4
0
 public function __construct($filename, $container)
 {
     parent::__construct($container, $filename);
     $this->_filename = $filename;
     $this->load();
 }