/** * Class constructor. * * Initializes repository with properties of TYPO3.org main repository. * * @access public * @return void */ function __construct($uid = 1) { $row = tx_em_Database::getRepositoryByUID($uid); if (!is_array($row) && $uid === 1) { $this->fixMainRepository(); } else { $this->setTitle($row['title']); $this->setDescription($row['description']); $this->setId($row['uid']); $this->setPriority(1); $this->setMirrorListUrl($row['mirror_url']); $this->setWsdlUrl($row['wsdl_url']); $this->setLastUpdate($row['lastUpdated']); $this->setExtensionCount($row['extCount']); } }
/** * Method returns UID of the current repository. * * @access public * @param boolean $insertIfMissing creates repository record in DB if set to TRUE * @return integer */ public function getRepositoryUID($insertIfMissing = FALSE) { $uid = $this->repository->getId(); $repository = tx_em_Database::getRepositoryByUID($uid); if (empty($repository) && $insertIfMissing) { $uid = tx_em_Database::insertRepository($this->repository); } else { $uid = intval($repository['uid']); } return $uid; }