‪TYPO3CMS  11.5
DummyClassWithGettersAndSetters.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
24 {
28  protected ‪$property;
29 
33  protected ‪$anotherProperty;
34 
38  protected ‪$property2;
39 
43  protected bool ‪$booleanProperty = true;
44 
48  protected ‪$protectedProperty;
49 
53  protected string ‪$unexposedProperty = 'unexposed';
54 
59 
63  public int ‪$publicProperty2 = 42;
64 
68  protected bool ‪$anotherBooleanProperty = true;
69 
73  public function ‪setProperty(‪$property): void
74  {
75  $this->property = ‪$property;
76  }
77 
81  public function ‪getProperty()
82  {
83  return ‪$this->property;
84  }
85 
89  public function ‪setAnotherProperty(‪$anotherProperty): void
90  {
91  $this->anotherProperty = ‪$anotherProperty;
92  }
93 
97  public function ‪getAnotherProperty()
98  {
100  }
101 
105  public function ‪getProperty2()
106  {
107  return ‪$this->property2;
108  }
109 
113  public function ‪setProperty2(‪$property2): void
114  {
115  $this->property2 = ‪$property2;
116  }
117 
121  protected function ‪getProtectedProperty(): string
122  {
123  return '42';
124  }
125 
129  protected function ‪setProtectedProperty($value): void
130  {
131  $this->protectedProperty = $value;
132  }
133 
137  public function ‪isBooleanProperty(): bool
138  {
140  }
141 
145  protected function ‪getPrivateProperty(): string
146  {
147  return '21';
148  }
149 
153  public function ‪setWriteOnlyMagicProperty($value): void {}
154 
161  {
162  $this->anotherBooleanProperty = ‪$anotherBooleanProperty;
163  }
164 
168  public function ‪hasAnotherBooleanProperty(): bool
169  {
171  }
172 
178  public function ‪hasSomeValue($value = 42): bool
179  {
180  return true;
181  }
182 }
‪TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyClassWithGettersAndSetters\getProperty2
‪mixed getProperty2()
Definition: DummyClassWithGettersAndSetters.php:100
‪TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyClassWithGettersAndSetters\getPrivateProperty
‪string getPrivateProperty()
Definition: DummyClassWithGettersAndSetters.php:140
‪TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyClassWithGettersAndSetters\getProtectedProperty
‪string getProtectedProperty()
Definition: DummyClassWithGettersAndSetters.php:116
‪TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyClassWithGettersAndSetters\setAnotherProperty
‪setAnotherProperty($anotherProperty)
Definition: DummyClassWithGettersAndSetters.php:84
‪TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture
Definition: ArrayAccessClass.php:18
‪TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyClassWithGettersAndSetters\isBooleanProperty
‪bool isBooleanProperty()
Definition: DummyClassWithGettersAndSetters.php:132
‪TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyClassWithGettersAndSetters\setProperty
‪setProperty($property)
Definition: DummyClassWithGettersAndSetters.php:68
‪TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyClassWithGettersAndSetters\setProperty2
‪setProperty2($property2)
Definition: DummyClassWithGettersAndSetters.php:108
‪TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyClassWithGettersAndSetters\$anotherBooleanProperty
‪bool $anotherBooleanProperty
Definition: DummyClassWithGettersAndSetters.php:63
‪TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyClassWithGettersAndSetters\hasSomeValue
‪bool hasSomeValue($value=42)
Definition: DummyClassWithGettersAndSetters.php:173
‪TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyClassWithGettersAndSetters\setAnotherBooleanProperty
‪setAnotherBooleanProperty($anotherBooleanProperty)
Definition: DummyClassWithGettersAndSetters.php:155
‪TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyClassWithGettersAndSetters
Definition: DummyClassWithGettersAndSetters.php:24
‪TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyClassWithGettersAndSetters\setWriteOnlyMagicProperty
‪setWriteOnlyMagicProperty($value)
Definition: DummyClassWithGettersAndSetters.php:148
‪TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyClassWithGettersAndSetters\getAnotherProperty
‪mixed getAnotherProperty()
Definition: DummyClassWithGettersAndSetters.php:92
‪TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyClassWithGettersAndSetters\setProtectedProperty
‪setProtectedProperty($value)
Definition: DummyClassWithGettersAndSetters.php:124
‪TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyClassWithGettersAndSetters\$unexposedProperty
‪string $unexposedProperty
Definition: DummyClassWithGettersAndSetters.php:49
‪TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyClassWithGettersAndSetters\$property2
‪mixed $property2
Definition: DummyClassWithGettersAndSetters.php:35
‪TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyClassWithGettersAndSetters\$publicProperty
‪mixed $publicProperty
Definition: DummyClassWithGettersAndSetters.php:53
‪TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyClassWithGettersAndSetters\getProperty
‪mixed getProperty()
Definition: DummyClassWithGettersAndSetters.php:76
‪TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyClassWithGettersAndSetters\hasAnotherBooleanProperty
‪bool hasAnotherBooleanProperty()
Definition: DummyClassWithGettersAndSetters.php:163
‪TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyClassWithGettersAndSetters\$anotherProperty
‪mixed $anotherProperty
Definition: DummyClassWithGettersAndSetters.php:31
‪TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyClassWithGettersAndSetters\$publicProperty2
‪int $publicProperty2
Definition: DummyClassWithGettersAndSetters.php:58
‪TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyClassWithGettersAndSetters\$protectedProperty
‪mixed $protectedProperty
Definition: DummyClassWithGettersAndSetters.php:44
‪TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyClassWithGettersAndSetters\$booleanProperty
‪bool $booleanProperty
Definition: DummyClassWithGettersAndSetters.php:40
‪TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyClassWithGettersAndSetters\$property
‪mixed $property
Definition: DummyClassWithGettersAndSetters.php:27