1<?php 2namespace TYPO3\CMS\Extbase\Persistence\Generic\Qom; 3 4/* 5 * This file is part of the TYPO3 CMS project. 6 * 7 * It is free software; you can redistribute it and/or modify it under 8 * the terms of the GNU General Public License, either version 2 9 * of the License, or any later version. 10 * 11 * For the full copyright and license information, please read the 12 * LICENSE.txt file that was distributed with this source code. 13 * 14 * The TYPO3 project - inspiring people to share! 15 */ 16 17/** 18 * Evaluates to the lower-case string value (or values, if multi-valued) of 19 * operand. 20 * 21 * If operand does not evaluate to a string value, its value is first converted 22 * to a string. 23 * 24 * If operand evaluates to null, the LowerCase operand also evaluates to null. 25 * @internal only to be used within Extbase, not part of TYPO3 Core API. 26 */ 27class LowerCase implements LowerCaseInterface 28{ 29 /** 30 * @var PropertyValueInterface 31 */ 32 protected $operand; 33 34 /** 35 * Constructs this LowerCase instance 36 * 37 * @param PropertyValueInterface $operand 38 */ 39 public function __construct(PropertyValueInterface $operand) 40 { 41 $this->operand = $operand; 42 } 43 44 /** 45 * Gets the operand whose value is converted to a lower-case string. 46 * 47 * @return PropertyValueInterface the operand; non-null 48 */ 49 public function getOperand() 50 { 51 return $this->operand; 52 } 53 54 /** 55 * Gets the name of the selector against which to evaluate this operand. 56 * 57 * @return string the selector name; non-null 58 */ 59 public function getSelectorName() 60 { 61 return $this->operand->getSelectorName(); 62 } 63 64 /** 65 * Gets the name of the property. 66 * 67 * @return string the property name; non-null 68 */ 69 public function getPropertyName() 70 { 71 return 'LOWER' . $this->operand->getPropertyName(); 72 } 73} 74