[BUGFIX] Fix PHP warning in EXT:beuser
[Packages/TYPO3.CMS.git] / typo3 / sysext / beuser / Classes / Domain / Model / ModuleData.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 2012 Felix Kopp <felix-source@phorax.com>
6 * All rights reserved
7 *
8 * This script is part of the TYPO3 project. The TYPO3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
16 * A copy is found in the textfile GPL.txt and important notices to the license
17 * from the author is found in LICENSE.txt distributed with these scripts.
18 *
19 * This script is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * This copyright notice MUST APPEAR in all copies of the script!
25 ***************************************************************/
26
27 /**
28 * Module data object
29 *
30 * @author Felix Kopp <felix-source@phorax.com>
31 * @author Nikolas Hagelstein <nikolas.hagelstein@gmail.com>
32 * @package TYPO3
33 * @subpackage beuser
34 */
35 class Tx_Beuser_Domain_Model_ModuleData {
36
37 /**
38 * @var Tx_Beuser_Domain_Model_Demand
39 * @inject
40 */
41 protected $demand;
42
43 /**
44 * @var array
45 */
46 protected $compareUserList = array();
47
48 /**
49 * @return Tx_Beuser_Domain_Model_Demand
50 */
51 public function getDemand() {
52 return $this->demand;
53 }
54
55 /**
56 * @param Tx_Beuser_Domain_Model_Demand $demand
57 * @return void
58 */
59 public function setDemand(Tx_Beuser_Domain_Model_Demand $demand) {
60 $this->demand = $demand;
61 }
62
63 /**
64 * Returns the compare list as array of user uis
65 *
66 * @return array
67 */
68 public function getCompareUserList() {
69 return array_keys($this->compareUserList);
70 }
71
72 /**
73 * Adds one backend user (by uid) to the compare user list
74 * Cannot be ObjectStorage, must be array
75 *
76 * @param integer $uid
77 * @return void
78 */
79 public function attachUidCompareUser($uid) {
80 $this->compareUserList[$uid] = TRUE;
81 }
82
83 /**
84 * Strip one backend user from the compare user list
85 *
86 * @param integer $uid
87 * @return void
88 */
89 public function detachUidCompareUser($uid) {
90 unset($this->compareUserList[$uid]);
91 }
92
93 }
94
95 ?>