TYPO3 CMS  TYPO3_8-7
Testclasses.php
Go to the documentation of this file.
1 <?php
6 {
7 }
8 
13 {
17  public $b;
18 
22  public $c;
23 
29  {
30  $this->b = $b;
31  $this->c = $c;
32  }
33 }
34 
39 {
43  public $b;
44 
48  public $c;
49 
53  public $myvalue;
54 
60  public function __construct(\t3lib_object_tests_b $b, \t3lib_object_tests_c $c, array $myvalue = ['some' => 'default'])
61  {
62  $this->b = $b;
63  $this->c = $c;
64  $this->myvalue = $myvalue;
65  }
66 }
67 
72 {
76  public $b;
77 
81  public $c;
82 
86  public $myvalue;
87 
93  public function __construct(\t3lib_object_tests_b $b, \t3lib_object_tests_c $c, $myvalue = null)
94  {
95  $this->b = $b;
96  $this->c = $c;
97  $this->myvalue = $myvalue;
98  }
99 }
100 
105 {
109  public $b;
110 
114  public $c;
115 
119  public $myvalue;
120 
126  public function __construct(\t3lib_object_tests_b $b, \t3lib_object_tests_c $c, $someDefaultParameter = ['some' => 'default'])
127  {
128  $this->b = $b;
129  $this->c = $c;
130  $this->myvalue = $someDefaultParameter;
131  }
132 }
133 
138 {
142  public $c;
143 
147  public function __construct(\t3lib_object_tests_c $c)
148  {
149  $this->c = $c;
150  }
151 }
152 
157 {
158 }
159 
164 {
165 }
166 
171 {
172 }
173 
177 class t3lib_object_tests_serializable implements \Serializable
178 {
179  public function serialize()
180  {
181  }
182  public function unserialize($s)
183  {
184  }
185 }
186 
191 {
192 }
193 
198 {
199 }
200 
205 {
210  {
211  $this->dependency = $i;
212  }
213 }
214 
219 {
224  {
225  }
226 }
227 
232 {
237  {
238  }
239 }
240 
245 {
250  {
251  }
252 }
253 
258 {
263  {
264  }
265 }
266 
271 {
275  public $b;
276 
280  public $bchild;
281 
285  public function injectClassB(\t3lib_object_tests_b $o)
286  {
287  $this->b = $o;
288  }
289 
295  {
296  $this->bchild = $o;
297  }
298 }
299 
304 {
308  public $settings;
309 
313  public function injectExtensionSettings(array $settings)
314  {
315  $this->settings = $settings;
316  }
317 }
318 
323 {
327  public $o2;
328 
333  {
334  $this->o2 = $cyclic2;
335  }
336 }
337 
342 {
346  public $o1;
347 
351  public $o3;
352 
357  {
358  $this->o1 = $cyclic1;
359  }
360 
365  {
366  $this->o3 = $cyclic3;
367  }
368 }
369 
374 {
378  public $o1;
379 
384  {
385  $this->o1 = $cyclic1;
386  }
387 }
388 
393 {
398  {
399  }
400 
405  {
406  }
407 
411  public function injectSettings(array $settings)
412  {
413  }
414 }
415 
416 /*
417  * a Singleton requires a Prototype for Injection -> allowed, autowiring active, but in development context we write a log message, as it is bad practice and most likely points to some logic error.
418 If a Singleton requires a Singleton for Injection -> allowed, autowiring active
419 If a Prototype requires a Prototype for Injection -> allowed, autowiring active
420 If a Prototype requires a Singleton for Injection -> allowed, autowiring active
421  */
426 {
427 }
428 
433 {
434 }
435 
440 {
444  public $dependency;
445 
449  public function injectDependency(\t3lib_object_prototype $dependency)
450  {
451  $this->dependency = $dependency;
452  }
453 }
454 
459 {
463  public $dependency;
464 
468  public function injectDependency(\t3lib_object_singleton $dependency)
469  {
470  $this->dependency = $dependency;
471  }
472 }
473 
478 {
482  public $dependency;
483 
487  public function injectDependency(\t3lib_object_prototype $dependency)
488  {
489  $this->dependency = $dependency;
490  }
491 }
492 
497 {
501  public $dependency;
502 
506  public function injectDependency(\t3lib_object_singleton $dependency)
507  {
508  $this->dependency = $dependency;
509  }
510 }
511 
516 {
520  public function __construct(\t3lib_object_prototype $dependency)
521  {
522  $this->dependency = $dependency;
523  }
524 }
525 
530 {
534  public function __construct(\t3lib_object_singleton $dependency)
535  {
536  $this->dependency = $dependency;
537  }
538 }
539 
544 {
548  public function __construct(\t3lib_object_prototype $dependency)
549  {
550  $this->dependency = $dependency;
551  }
552 }
553 
558 {
562  public function __construct(\t3lib_object_singleton $dependency)
563  {
564  $this->dependency = $dependency;
565  }
566 }
567 
572 {
576  protected $initialized = false;
577 
578  public function initializeObject()
579  {
580  if ($this->initialized) {
581  throw new \Exception('initializeObject was called a second time', 1433944932);
582  }
583  $this->initialized = true;
584  }
585 
589  public function isInitialized()
590  {
591  return $this->initialized;
592  }
593 }
injectCyclic3(\t3lib_object_tests_resolveablecyclic3 $cyclic3)
injectFoo(\t3lib_object_tests_cyclic2WithSetterDependency $c)
__construct(\t3lib_object_tests_resolveablecyclic2 $cyclic2)
__construct(\t3lib_object_tests_c $c, \t3lib_object_tests_b $b)
Definition: Testclasses.php:28
injectCyclic1(\t3lib_object_tests_resolveablecyclic1 $cyclic1)
__construct(\t3lib_object_singleton $dependency)
injectClassB(\t3lib_object_tests_b $o)
__construct(\t3lib_object_tests_someinterface $i)
__construct(\t3lib_object_tests_b $b, \t3lib_object_tests_c $c, $myvalue=null)
Definition: Testclasses.php:93
__construct(\t3lib_object_tests_cyclic2 $c)
injectCyclic1(\t3lib_object_tests_resolveablecyclic1 $cyclic1)
injectDependency(\t3lib_object_singleton $dependency)
__construct(\t3lib_object_prototype $dependency)
__construct(\t3lib_object_prototype $dependency)
injectExtensionSettings(array $settings)
injectFoo(\t3lib_object_tests_cyclic1WithSetterDependency $c)
__construct(\t3lib_object_singleton $dependency)
injectDependency(\t3lib_object_prototype $dependency)
__construct(\t3lib_object_tests_cyclic1 $c)
__construct(\t3lib_object_tests_b $b, \t3lib_object_tests_c $c, $someDefaultParameter=['some'=> 'default'])
injectDependency(\t3lib_object_singleton $dependency)
__construct(\t3lib_object_tests_b $b, \t3lib_object_tests_c $c, array $myvalue=['some'=> 'default'])
Definition: Testclasses.php:60
setClassBChild(\t3lib_object_tests_b_child $o)
injectFoo(\t3lib_object_tests_resolveablecyclic1 $c1)
injectDependency(\t3lib_object_prototype $dependency)
injectingFoo(\t3lib_object_tests_resolveablecyclic1 $c1)
__construct(\t3lib_object_tests_c $c)