Exemplo n.º 1
0
 /**
  * @param PHPExcel_Cell $cell
  * {@inheritdoc}
  */
 public function __construct(PHPExcel_Cell $cell, $message = "", $code = 0, \Exception $previous = null)
 {
     $sheetTitle = $cell->getWorksheet()->getTitle();
     $cellCoordinate = $cell->getCoordinate();
     $message = "Error when preparing data for import: sheet \"{$sheetTitle}\", cell \"{$cellCoordinate}\". {$message}";
     parent::__construct($message, $code, $previous);
 }
 /**
  * @param StandardAttribute $standardAttribute
  * {@inheritdoc}
  */
 public function __construct(StandardAttribute $standardAttribute, $message = "", $code = 0, \Exception $previous = null)
 {
     $attributeName = 'attribute';
     if ($standardAttribute->name) {
         $attributeName .= " {$standardAttribute->name}";
     }
     $modelClass = "{$standardAttribute->standardModel->className}";
     $message = "Invalid configuration for {$attributeName} in model {$modelClass}. {$message}";
     parent::__construct($message, $code, $previous);
 }
Exemplo n.º 3
0
 /**
  * @param PHPExcel_Worksheet_Row $row
  * {@inheritdoc}
  */
 public function __construct(PHPExcel_Worksheet_Row $row, $message = "", $code = 0, \Exception $previous = null)
 {
     $sheetTitle = $row->getCellIterator()->current()->getWorksheet()->getTitle();
     $message = "Import failed at sheet \"{$sheetTitle}\", row \"{$row->getRowIndex()}\". {$message}";
     parent::__construct($message, $code, $previous);
 }