コード例 #1
0
ファイル: Excel.php プロジェクト: ymnl007/Clerk
 /**
  * @throws \Maatwebsite\Clerk\Exceptions\DriverNotFoundException
  * @return \Maatwebsite\Clerk\Writer
  */
 public function initWriter()
 {
     $writer = WriterFactory::create($this->getDriver('writer'), $this->getFormat(), $this->getExtension(), $this->getWorkbook());
     return $writer;
 }
コード例 #2
0
ファイル: WriterFactoryTest.php プロジェクト: ymnl007/Clerk
 public function test_factory_returns_exception_when_trying_to_use_it_without_sheets()
 {
     $this->setExpectedException('Maatwebsite\\Clerk\\Exceptions\\ExportFailedException');
     $workbook = new Workbook('mock');
     WriterFactory::create(new PHPExcel('drivers.writer.excel2003'), 'Excel5', 'xls', $workbook);
 }