Exemplo n.º 1
0
 /**
  * Returns an equals criterion used for matching objects against a query
  *
  * @param string $propertyName The name of the property to compare against
  * @param mixed $operand The value to compare with
  * @param boolean $caseSensitive Whether the equality test should be done case-sensitive
  * @return Tx_Extbase_Persistence_QOM_ComparisonInterface
  * @api
  */
 public function equals($propertyName, $operand, $caseSensitive = TRUE)
 {
     if (is_object($operand) || $caseSensitive) {
         $comparison = $this->qomFactory->comparison($this->qomFactory->propertyValue($propertyName, $this->getSelectorName()), Tx_Extbase_Persistence_QueryInterface::OPERATOR_EQUAL_TO, $operand);
     } else {
         $comparison = $this->qomFactory->comparison($this->qomFactory->lowerCase($this->qomFactory->propertyValue($propertyName, $this->getSelectorName())), Tx_Extbase_Persistence_QueryInterface::OPERATOR_EQUAL_TO, strtolower($operand));
     }
     return $comparison;
 }