[CLEANUP] The correct case must be used for standard PHP types in phpdoc
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Tests / Functional / Fixtures / Extensions / irre_tutorial / Classes / Service / QueueService.php
1 <?php
2 namespace OliverHader\IrreTutorial\Service;
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
17 /**
18 * ContentController
19 */
20 class QueueService implements \TYPO3\CMS\Core\SingletonInterface
21 {
22 /**
23 * @var array
24 */
25 protected $calls;
26
27 /**
28 * @var array
29 */
30 protected $values = [];
31
32 /**
33 * @var bool
34 */
35 protected $active = false;
36
37 /**
38 * @param array $calls
39 */
40 public function set(array $calls)
41 {
42 $this->calls = $calls;
43 $this->active = true;
44 }
45
46 /**
47 * @return array
48 */
49 public function get()
50 {
51 return $this->calls;
52 }
53
54 /**
55 * @return bool
56 */
57 public function isActive()
58 {
59 return $this->active;
60 }
61
62 public function setActive($active = true)
63 {
64 $this->active = (bool)$active;
65 }
66
67 /**
68 * @return null|array
69 */
70 public function shift()
71 {
72 return array_shift($this->calls);
73 }
74
75 /**
76 * @param string $identifier
77 * @param mixed $value
78 */
79 public function addValue($identifier, $value)
80 {
81 $this->values[$identifier] = $value;
82 }
83
84 /**
85 * @return array
86 */
87 public function getValues()
88 {
89 return $this->values;
90 }
91 }