/** * SlicePredicate constructor * @param string $slicePredicateType Type of Slice Predicate, either 'SliceRange' or 'Columns' * @param array $predicateAttribute Attribute of the SlicePredicate, its value is interpreted according to the type of SlicePredicate that is being built */ public function __construct($slicePredicateType = self::TYPE_RANGE, array $predicateAttribute = array()) { parent::__construct(); if ($slicePredicateType == self::TYPE_COLUMNS || $slicePredicateType == self::TYPE_RANGE) { $this->_slicePredicateType = $slicePredicateType; } $this->buildPredicateAttribute($predicateAttribute); }
public function __construct($vals = null) { if (!isset(self::$_TSPEC)) { self::$_TSPEC = array(1 => array('var' => 'column_names', 'type' => TType::LST, 'etype' => TType::STRING, 'elem' => array('type' => TType::STRING)), 2 => array('var' => 'slice_range', 'type' => TType::STRUCT, 'class' => 'cassandra_SliceRange')); } if (is_array($vals)) { if (isset($vals['column_names'])) { $this->column_names = $vals['column_names']; } if (isset($vals['slice_range'])) { $this->slice_range = $vals['slice_range']; } } }