[FEATURE] Support 'has*' for properties in ObjectAccess
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Tests / Unit / Reflection / Fixture / DummyClassWithGettersAndSetters.php
1 <?php
2 namespace TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture;
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 * Fixture class with getters and setters
19 *
20 * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later
21 */
22 class DummyClassWithGettersAndSetters {
23
24 protected $property;
25
26 protected $anotherProperty;
27
28 protected $property2;
29
30 protected $booleanProperty = TRUE;
31
32 protected $protectedProperty;
33
34 protected $unexposedProperty = 'unexposed';
35
36 public $publicProperty;
37
38 public $publicProperty2 = 42;
39
40 protected $anotherBooleanProperty = TRUE;
41
42 /**
43 * @param mixed $property
44 */
45 public function setProperty($property) {
46 $this->property = $property;
47 }
48
49 /**
50 * @return mixed
51 */
52 public function getProperty() {
53 return $this->property;
54 }
55
56 /**
57 * @param mixed $anotherProperty
58 */
59 public function setAnotherProperty($anotherProperty) {
60 $this->anotherProperty = $anotherProperty;
61 }
62
63 /**
64 * @return mixed
65 */
66 public function getAnotherProperty() {
67 return $this->anotherProperty;
68 }
69
70 /**
71 * @return mixed
72 */
73 public function getProperty2() {
74 return $this->property2;
75 }
76
77 /**
78 * @param mixed $property2
79 */
80 public function setProperty2($property2) {
81 $this->property2 = $property2;
82 }
83
84 /**
85 * @return string
86 */
87 protected function getProtectedProperty() {
88 return '42';
89 }
90
91 /**
92 * @param mixed $value
93 */
94 protected function setProtectedProperty($value) {
95 $this->protectedProperty = $value;
96 }
97
98 /**
99 * @return bool
100 */
101 public function isBooleanProperty() {
102 return $this->booleanProperty;
103 }
104
105 /**
106 * @return string
107 */
108 protected function getPrivateProperty() {
109 return '21';
110 }
111
112 /**
113 * @param mixed $value
114 */
115 public function setWriteOnlyMagicProperty($value) {
116 }
117
118 /**
119 * sets the AnotherBooleanProperty
120 *
121 * @param boolean $anotherBooleanProperty
122 *
123 * @return void
124 */
125 public function setAnotherBooleanProperty($anotherBooleanProperty) {
126 $this->anotherBooleanProperty = $anotherBooleanProperty;
127 }
128
129 /**
130 * @return bool
131 */
132 public function hasAnotherBooleanProperty() {
133 return $this->anotherBooleanProperty;
134 }
135
136 }