TYPO3  7.6
extensionmanager/Classes/Domain/Model/Repository.php
Go to the documentation of this file.
1 <?php
2 namespace TYPO3\CMS\Extensionmanager\Domain\Model;
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 
22 {
28  protected $title;
29 
35  protected $description;
36 
42  protected $mirrorListUrl;
43 
49  protected $mirrors;
50 
56  protected $wsdlUrl;
57 
63  protected $lastUpdate;
64 
70  protected $extensionCount;
71 
79  public function getTitle()
80  {
81  return $this->title;
82  }
83 
92  public function setTitle($title)
93  {
94  if (!empty($title) && is_string($title)) {
95  $this->title = $title;
96  }
97  }
98 
106  public function getDescription()
107  {
108  return $this->description;
109  }
110 
118  public function setDescription($description)
119  {
120  if (!empty($description) && is_string($description)) {
121  $this->description = $description;
122  }
123  }
124 
132  public function getMirrorListUrl()
133  {
134  return $this->mirrorListUrl;
135  }
136 
147  public function setMirrorListUrl($url)
148  {
149  if (empty($url) || !empty($url) && \TYPO3\CMS\Core\Utility\GeneralUtility::isValidUrl($url)) {
150  $this->mirrorListUrl = $url;
151  }
152  }
153 
161  public function getWsdlUrl()
162  {
163  return $this->wsdlUrl;
164  }
165 
173  public function setWsdlUrl($url)
174  {
175  if (!empty($url) && \TYPO3\CMS\Core\Utility\GeneralUtility::isValidUrl($url)) {
176  $this->wsdlUrl = $url;
177  }
178  }
179 
186  public function getLastUpdate()
187  {
188  return $this->lastUpdate;
189  }
190 
198  public function setLastUpdate(\DateTime $time)
199  {
200  $this->lastUpdate = $time;
201  }
202 
209  public function getExtensionCount()
210  {
211  return $this->extensionCount;
212  }
213 
221  public function setExtensionCount($count)
222  {
223  $this->extensionCount = $count;
224  }
225 
236  public function addMirrors(\TYPO3\CMS\Extensionmanager\Domain\Model\Mirrors $mirrors)
237  {
238  $this->mirrors = $mirrors;
239  }
240 
249  public function hasMirrors()
250  {
251  $hasMirrors = false;
252  if (is_object($this->mirrors)) {
253  $hasMirrors = true;
254  }
255  return $hasMirrors;
256  }
257 
265  public function getMirrors()
266  {
267  return $this->hasMirrors() ? $this->mirrors : null;
268  }
269 
277  public function removeMirrors()
278  {
279  unset($this->mirrors);
280  }
281 }