TYPO3 CMS  TYPO3_8-7
DummyClassWithGettersAndSetters.php
Go to the documentation of this file.
1 <?php
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 
23 {
27  protected $property;
28 
32  protected $anotherProperty;
33 
37  protected $property2;
38 
42  protected $booleanProperty = true;
43 
47  protected $protectedProperty;
48 
52  protected $unexposedProperty = 'unexposed';
53 
58 
62  public $publicProperty2 = 42;
63 
67  protected $anotherBooleanProperty = true;
68 
72  public function setProperty($property)
73  {
74  $this->property = $property;
75  }
76 
80  public function getProperty()
81  {
82  return $this->property;
83  }
84 
89  {
90  $this->anotherProperty = $anotherProperty;
91  }
92 
96  public function getAnotherProperty()
97  {
99  }
100 
104  public function getProperty2()
105  {
106  return $this->property2;
107  }
108 
112  public function setProperty2($property2)
113  {
114  $this->property2 = $property2;
115  }
116 
120  protected function getProtectedProperty()
121  {
122  return '42';
123  }
124 
128  protected function setProtectedProperty($value)
129  {
130  $this->protectedProperty = $value;
131  }
132 
136  public function isBooleanProperty()
137  {
138  return $this->booleanProperty;
139  }
140 
144  protected function getPrivateProperty()
145  {
146  return '21';
147  }
148 
152  public function setWriteOnlyMagicProperty($value)
153  {
154  }
155 
162  {
163  $this->anotherBooleanProperty = $anotherBooleanProperty;
164  }
165 
169  public function hasAnotherBooleanProperty()
170  {
172  }
173 
179  public function hasSomeValue($value = 42)
180  {
181  return true;
182  }
183 }