setIdentifier($identifier); } if ($minValue !== null) { $this->setMinValue($minValue); } if ($maxValue !== null) { $this->setMaxValue($maxValue); } } /** * Set identifier for comparison * * @param string $identifier * @return Between */ public function setIdentifier($identifier) { $this->identifier = $identifier; return $this; } /** * Get identifier of comparison * * @return null|string */ public function getIdentifier() { return $this->identifier; } /** * Set minimum boundary for comparison * * @param int|float|string $minValue * @return Between */ public function setMinValue($minValue) { $this->minValue = $minValue; return $this; } /** * Get minimum boundary for comparison * * @return null|int|float|string */ public function getMinValue() { return $this->minValue; } /** * Set maximum boundary for comparison * * @param int|float|string $maxValue * @return Between */ public function setMaxValue($maxValue) { $this->maxValue = $maxValue; return $this; } /** * Get maximum boundary for comparison * * @return null|int|float|string */ public function getMaxValue() { return $this->maxValue; } /** * Set specification string to use in forming SQL predicate * * @param string $specification * @return Between */ public function setSpecification($specification) { $this->specification = $specification; return $this; } /** * Get specification string to use in forming SQL predicate * * @return string */ public function getSpecification() { return $this->specification; } /** * Return "where" parts * * @return array */ public function getExpressionData() { list($values[], $types[]) = $this->normalizeArgument($this->identifier, self::TYPE_IDENTIFIER); list($values[], $types[]) = $this->normalizeArgument($this->minValue, self::TYPE_VALUE); list($values[], $types[]) = $this->normalizeArgument($this->maxValue, self::TYPE_VALUE); return array( array( $this->getSpecification(), $values, $types, ), ); } }