You are here

public function PHPExcel_Cell::__construct in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell.php \PHPExcel_Cell::__construct()

* Create a new Cell * *

Parameters

mixed $pValue: * @param string $pDataType * @param PHPExcel_Worksheet $pSheet * @throws PHPExcel_Exception

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell.php, line 128

Class

PHPExcel_Cell
PHPExcel_Cell

Code

public function __construct($pValue = NULL, $pDataType = NULL, PHPExcel_Worksheet $pSheet = NULL) {

  // Initialise cell value
  $this->_value = $pValue;

  // Set worksheet cache
  $this->_parent = $pSheet
    ->getCellCacheController();

  // Set datatype?
  if ($pDataType !== NULL) {
    if ($pDataType == PHPExcel_Cell_DataType::TYPE_STRING2) {
      $pDataType = PHPExcel_Cell_DataType::TYPE_STRING;
    }
    $this->_dataType = $pDataType;
  }
  elseif (!self::getValueBinder()
    ->bindValue($this, $pValue)) {
    throw new PHPExcel_Exception("Value could not be bound to cell.");
  }
}