AccountData.php
177 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Account; |
| 4 | |
| 5 | /** |
| 6 | * Class AccountData is the data holder |
| 7 | * for Analyst\Account\Account class |
| 8 | * which is unserialized from database |
| 9 | */ |
| 10 | class AccountData |
| 11 | { |
| 12 | /** |
| 13 | * Account id |
| 14 | * |
| 15 | * @var string |
| 16 | */ |
| 17 | protected $id; |
| 18 | |
| 19 | /** |
| 20 | * Account secret key |
| 21 | * |
| 22 | * @var string |
| 23 | */ |
| 24 | protected $secret; |
| 25 | |
| 26 | /** |
| 27 | * Basename of plugin |
| 28 | * |
| 29 | * @var string |
| 30 | */ |
| 31 | protected $path; |
| 32 | |
| 33 | /** |
| 34 | * Whether admin accepted opt in |
| 35 | * terms and permissions |
| 36 | * |
| 37 | * @var bool |
| 38 | */ |
| 39 | protected $isInstalled = false; |
| 40 | |
| 41 | /** |
| 42 | * Is user sign in for data tracking |
| 43 | * |
| 44 | * @var bool |
| 45 | */ |
| 46 | protected $isOptedIn = false; |
| 47 | |
| 48 | /** |
| 49 | * Is user accepted permissions grant |
| 50 | * for collection site data |
| 51 | * |
| 52 | * @var bool |
| 53 | */ |
| 54 | protected $isSigned = false; |
| 55 | |
| 56 | /** |
| 57 | * Is user ever resolved install modal window? |
| 58 | * |
| 59 | * @var bool |
| 60 | */ |
| 61 | protected $isInstallResolved; |
| 62 | |
| 63 | /** |
| 64 | * @return string |
| 65 | */ |
| 66 | public function getId() |
| 67 | { |
| 68 | return $this->id; |
| 69 | } |
| 70 | |
| 71 | /** |
| 72 | * @param string $id |
| 73 | */ |
| 74 | public function setId($id) |
| 75 | { |
| 76 | $this->id = $id; |
| 77 | } |
| 78 | |
| 79 | /** |
| 80 | * @param string $path |
| 81 | * @return AccountData |
| 82 | */ |
| 83 | public function setPath($path) |
| 84 | { |
| 85 | $this->path = $path; |
| 86 | return $this; |
| 87 | } |
| 88 | |
| 89 | /** |
| 90 | * @return bool |
| 91 | */ |
| 92 | public function isInstalled() |
| 93 | { |
| 94 | return $this->isInstalled; |
| 95 | } |
| 96 | |
| 97 | /** |
| 98 | * @param bool $isInstalled |
| 99 | */ |
| 100 | public function setIsInstalled($isInstalled) |
| 101 | { |
| 102 | $this->isInstalled = $isInstalled; |
| 103 | } |
| 104 | |
| 105 | /** |
| 106 | * @return bool |
| 107 | */ |
| 108 | public function isOptedIn() |
| 109 | { |
| 110 | return $this->isOptedIn; |
| 111 | } |
| 112 | |
| 113 | /** |
| 114 | * @param bool $isOptedIn |
| 115 | */ |
| 116 | public function setIsOptedIn($isOptedIn) |
| 117 | { |
| 118 | $this->isOptedIn = $isOptedIn; |
| 119 | } |
| 120 | |
| 121 | /** |
| 122 | * @return bool |
| 123 | */ |
| 124 | public function isSigned() |
| 125 | { |
| 126 | return $this->isSigned; |
| 127 | } |
| 128 | |
| 129 | /** |
| 130 | * @param bool $isSigned |
| 131 | */ |
| 132 | public function setIsSigned($isSigned) |
| 133 | { |
| 134 | $this->isSigned = $isSigned; |
| 135 | } |
| 136 | |
| 137 | /** |
| 138 | * @return string |
| 139 | */ |
| 140 | public function getPath() |
| 141 | { |
| 142 | return $this->path; |
| 143 | } |
| 144 | |
| 145 | /** |
| 146 | * @return string |
| 147 | */ |
| 148 | public function getSecret() |
| 149 | { |
| 150 | return $this->secret; |
| 151 | } |
| 152 | |
| 153 | /** |
| 154 | * @param string $secret |
| 155 | */ |
| 156 | public function setSecret($secret) |
| 157 | { |
| 158 | $this->secret = $secret; |
| 159 | } |
| 160 | |
| 161 | /** |
| 162 | * @return bool |
| 163 | */ |
| 164 | public function isInstallResolved() |
| 165 | { |
| 166 | return $this->isInstallResolved; |
| 167 | } |
| 168 | |
| 169 | /** |
| 170 | * @param bool $isInstallResolved |
| 171 | */ |
| 172 | public function setIsInstallResolved($isInstallResolved) |
| 173 | { |
| 174 | $this->isInstallResolved = $isInstallResolved; |
| 175 | } |
| 176 | } |
| 177 |