[TASK] Streamline phpdoc annotations in EXT:extbase
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Classes / Persistence / Generic / Qom / PropertyValue.php
1 <?php
2 namespace 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 value (or values, if multi-valued) of a property.
19 *
20 * If, for a node-tuple, the selector node does not have a property named property,
21 * the operand evaluates to null.
22 *
23 * The query is invalid if:
24 *
25 * selector is not the name of a selector in the query, or
26 * property is not a syntactically valid JCR name.
27 *
28 * @internal only to be used within Extbase, not part of TYPO3 Core API.
29 */
30 class PropertyValue implements PropertyValueInterface
31 {
32 /**
33 * @var string
34 */
35 protected $selectorName;
36
37 /**
38 * @var string
39 */
40 protected $propertyName;
41
42 /**
43 * Constructs this PropertyValue instance
44 *
45 * @param string $propertyName
46 * @param string $selectorName
47 */
48 public function __construct($propertyName, $selectorName = '')
49 {
50 $this->propertyName = $propertyName;
51 $this->selectorName = $selectorName;
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->selectorName;
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 $this->propertyName;
72 }
73 }