TYPO3 CMS  TYPO3_7-6
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 {
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 
37 
38  public $publicProperty2 = 42;
39 
40  protected $anotherBooleanProperty = true;
41 
45  public function setProperty($property)
46  {
47  $this->property = $property;
48  }
49 
53  public function getProperty()
54  {
55  return $this->property;
56  }
57 
62  {
63  $this->anotherProperty = $anotherProperty;
64  }
65 
69  public function getAnotherProperty()
70  {
72  }
73 
77  public function getProperty2()
78  {
79  return $this->property2;
80  }
81 
85  public function setProperty2($property2)
86  {
87  $this->property2 = $property2;
88  }
89 
93  protected function getProtectedProperty()
94  {
95  return '42';
96  }
97 
101  protected function setProtectedProperty($value)
102  {
103  $this->protectedProperty = $value;
104  }
105 
109  public function isBooleanProperty()
110  {
111  return $this->booleanProperty;
112  }
113 
117  protected function getPrivateProperty()
118  {
119  return '21';
120  }
121 
125  public function setWriteOnlyMagicProperty($value)
126  {
127  }
128 
137  {
138  $this->anotherBooleanProperty = $anotherBooleanProperty;
139  }
140 
144  public function hasAnotherBooleanProperty()
145  {
147  }
148 
154  public function hasSomeValue($value = 42)
155  {
156  return true;
157  }
158 }