TYPO3 CMS  TYPO3_7-6
QueueService.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 
21 {
25  protected $calls;
26 
30  protected $values = [];
31 
35  protected $active = false;
36 
40  public function set(array $calls)
41  {
42  $this->calls = $calls;
43  $this->active = true;
44  }
45 
49  public function get()
50  {
51  return $this->calls;
52  }
53 
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 
70  public function shift()
71  {
72  return array_shift($this->calls);
73  }
74 
79  public function addValue($identifier, $value)
80  {
81  $this->values[$identifier] = $value;
82  }
83 
87  public function getValues()
88  {
89  return $this->values;
90  }
91 }