setTimestampValue() public method

public setTimestampValue ( integer $value = null )
$value integer
Beispiel #1
0
 /**
  * Converts a TS PB Cell to a core lib Cell
  *
  * @param TsColumnDescription $column
  * @param TsCell $tsCell
  * @return Cell
  */
 public static function fromPbCell(TsColumnDescription $column, TsCell $tsCell)
 {
     $cell = new Cell($column->getName());
     switch ($column->getType()) {
         case TsColumnType::BOOLEAN:
             $cell->setBooleanValue($tsCell->getBooleanValue());
             break;
         case TsColumnType::BLOB:
             $cell->setBlobValue($tsCell->getVarcharValue());
             break;
         case TsColumnType::SINT64:
             $cell->setIntValue($tsCell->getSint64Value());
             break;
         case TsColumnType::DOUBLE:
             $cell->setDoubleValue($tsCell->getDoubleValue());
             break;
         case TsColumnType::TIMESTAMP:
             $cell->setTimestampValue($tsCell->getTimestampValue());
             break;
         default:
             $cell->setValue($tsCell->getVarcharValue());
             break;
     }
     return $cell;
 }