TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
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 
21 {
27  protected $title;
28 
34  protected $description;
35 
41  protected $mirrorListUrl;
42 
48  protected $mirrors;
49 
55  protected $wsdlUrl;
56 
62  protected $lastUpdate;
63 
69  protected $extensionCount;
70 
78  public function getTitle()
79  {
80  return $this->title;
81  }
82 
91  public function setTitle($title)
92  {
93  if (!empty($title) && is_string($title)) {
94  $this->title = $title;
95  }
96  }
97 
105  public function getDescription()
106  {
107  return $this->description;
108  }
109 
117  public function setDescription($description)
118  {
119  if (!empty($description) && is_string($description)) {
120  $this->description = $description;
121  }
122  }
123 
131  public function getMirrorListUrl()
132  {
133  return $this->mirrorListUrl;
134  }
135 
146  public function setMirrorListUrl($url)
147  {
148  if (empty($url) || !empty($url) && \TYPO3\CMS\Core\Utility\GeneralUtility::isValidUrl($url)) {
149  $this->mirrorListUrl = $url;
150  }
151  }
152 
160  public function getWsdlUrl()
161  {
162  return $this->wsdlUrl;
163  }
164 
172  public function setWsdlUrl($url)
173  {
174  if (!empty($url) && \TYPO3\CMS\Core\Utility\GeneralUtility::isValidUrl($url)) {
175  $this->wsdlUrl = $url;
176  }
177  }
178 
185  public function getLastUpdate()
186  {
187  return $this->lastUpdate;
188  }
189 
197  public function setLastUpdate(\DateTime $time)
198  {
199  $this->lastUpdate = $time;
200  }
201 
208  public function getExtensionCount()
209  {
210  return $this->extensionCount;
211  }
212 
220  public function setExtensionCount($count)
221  {
222  $this->extensionCount = $count;
223  }
224 
235  public function addMirrors(\TYPO3\CMS\Extensionmanager\Domain\Model\Mirrors $mirrors)
236  {
237  $this->mirrors = $mirrors;
238  }
239 
248  public function hasMirrors()
249  {
250  $hasMirrors = false;
251  if (is_object($this->mirrors)) {
252  $hasMirrors = true;
253  }
254  return $hasMirrors;
255  }
256 
264  public function getMirrors()
265  {
266  return $this->hasMirrors() ? $this->mirrors : null;
267  }
268 
276  public function removeMirrors()
277  {
278  unset($this->mirrors);
279  }
280 }
addMirrors(\TYPO3\CMS\Extensionmanager\Domain\Model\Mirrors $mirrors)