TYPO3 CMS  TYPO3_7-6
Testclasses.php
Go to the documentation of this file.
1 <?php
6 {
7 }
8 
13 {
14  public $b;
15 
16  public $c;
17 
23  {
24  $this->b = $b;
25  $this->c = $c;
26  }
27 }
28 
33 {
34  public $b;
35 
36  public $c;
37 
38  public $myvalue;
39 
45  public function __construct(\t3lib_object_tests_b $b, \t3lib_object_tests_c $c, array $myvalue = ['some' => 'default'])
46  {
47  $this->b = $b;
48  $this->c = $c;
49  $this->myvalue = $myvalue;
50  }
51 }
52 
57 {
58  public $b;
59 
60  public $c;
61 
62  public $myvalue;
63 
69  public function __construct(\t3lib_object_tests_b $b, \t3lib_object_tests_c $c, $myvalue = null)
70  {
71  $this->b = $b;
72  $this->c = $c;
73  $this->myvalue = $myvalue;
74  }
75 }
76 
81 {
82  public $b;
83 
84  public $c;
85 
86  public $myvalue;
87 
93  public function __construct(\t3lib_object_tests_b $b, \t3lib_object_tests_c $c, $someDefaultParameter = ['some' => 'default'])
94  {
95  $this->b = $b;
96  $this->c = $c;
97  $this->myvalue = $someDefaultParameter;
98  }
99 }
100 
105 {
106  public $c;
107 
111  public function __construct(\t3lib_object_tests_c $c)
112  {
113  $this->c = $c;
114  }
115 }
116 
121 {
122 }
123 
128 {
129 }
130 
135 {
136 }
137 
141 class t3lib_object_tests_serializable implements \Serializable
142 {
143  public function serialize()
144  {
145  }
146  public function unserialize($s)
147  {
148  }
149 }
150 
155 {
156 }
157 
162 {
163 }
164 
169 {
174  {
175  $this->dependency = $i;
176  }
177 }
178 
183 {
188  {
189  }
190 }
191 
196 {
201  {
202  }
203 }
204 
209 {
214  {
215  }
216 }
217 
222 {
227  {
228  }
229 }
230 
235 {
236  public $b;
237 
238  public $bchild;
239 
243  public function injectClassB(\t3lib_object_tests_b $o)
244  {
245  $this->b = $o;
246  }
247 
253  {
254  $this->bchild = $o;
255  }
256 }
257 
262 {
263  public $settings;
264 
268  public function injectExtensionSettings(array $settings)
269  {
270  $this->settings = $settings;
271  }
272 }
273 
278 {
279  public $o2;
280 
285  {
286  $this->o2 = $cyclic2;
287  }
288 }
289 
294 {
295  public $o1;
296 
297  public $o3;
298 
303  {
304  $this->o1 = $cyclic1;
305  }
306 
311  {
312  $this->o3 = $cyclic3;
313  }
314 }
315 
320 {
321  public $o1;
322 
327  {
328  $this->o1 = $cyclic1;
329  }
330 }
331 
336 {
341  {
342  }
343 
348  {
349  }
350 
354  public function injectSettings(array $settings)
355  {
356  }
357 }
358 
359 /*
360  * 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.
361 If a Singleton requires a Singleton for Injection -> allowed, autowiring active
362 If a Prototype requires a Prototype for Injection -> allowed, autowiring active
363 If a Prototype requires a Singleton for Injection -> allowed, autowiring active
364  */
369 {
370 }
371 
376 {
377 }
378 
383 {
387  public $dependency;
388 
392  public function injectDependency(\t3lib_object_prototype $dependency)
393  {
394  $this->dependency = $dependency;
395  }
396 }
397 
402 {
406  public $dependency;
407 
411  public function injectDependency(\t3lib_object_singleton $dependency)
412  {
413  $this->dependency = $dependency;
414  }
415 }
416 
421 {
425  public $dependency;
426 
430  public function injectDependency(\t3lib_object_prototype $dependency)
431  {
432  $this->dependency = $dependency;
433  }
434 }
435 
440 {
444  public $dependency;
445 
449  public function injectDependency(\t3lib_object_singleton $dependency)
450  {
451  $this->dependency = $dependency;
452  }
453 }
454 
459 {
463  public function __construct(\t3lib_object_prototype $dependency)
464  {
465  $this->dependency = $dependency;
466  }
467 }
468 
473 {
477  public function __construct(\t3lib_object_singleton $dependency)
478  {
479  $this->dependency = $dependency;
480  }
481 }
482 
487 {
491  public function __construct(\t3lib_object_prototype $dependency)
492  {
493  $this->dependency = $dependency;
494  }
495 }
496 
501 {
505  public function __construct(\t3lib_object_singleton $dependency)
506  {
507  $this->dependency = $dependency;
508  }
509 }
510 
515 {
519  protected $initialized = false;
520 
521  public function initializeObject()
522  {
523  if ($this->initialized) {
524  throw new \Exception('initializeObject was called a second time', 1433944932);
525  }
526  $this->initialized = true;
527  }
528 
532  public function isInitialized()
533  {
534  return $this->initialized;
535  }
536 }
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:22
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:69
__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'])
Definition: Testclasses.php:93
injectDependency(\t3lib_object_singleton $dependency)
__construct(\t3lib_object_tests_b $b, \t3lib_object_tests_c $c, array $myvalue=['some'=> 'default'])
Definition: Testclasses.php:45
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)