/**
* Represents a list of viewable category nodes.
- *
+ *
* @author Matthias Schmidt
- * @copyright 2001-2012 WoltLab GmbH
+ * @copyright 2001-2013 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package com.woltlab.wcf
* @subpackage data.category
* @var array<wcf\data\VersionableDatabaseObject>
*/
protected $versions = array();
-
+
/**
* maps each version id to its object type id and object type version id
* @var array<array>
*/
protected $versionIDs = array();
-
+
/**
* mapes the names of the version object types to the object type ids
* @var array<integer>
*/
protected $objectTypeIDs = array();
-
+
/**
* list of version object types
* @var array<wcf\data\object\type>
*/
protected $objectTypes = array();
-
+
/**
* Returns all version of object with the given object type id and object id.
*
if (isset($this->versions[$objectTypeID][$objectID])) {
return $this->versions[$objectTypeID][$objectID];
}
-
+
return array();
}
-
+
/**
* Returns the database object with the given version id.
*
if (isset($this->versionIDs[$objectTypeID][$versionID])) {
return $this->versionIDs[$objectTypeID][$versionID];
}
-
+
return null;
}
-
+
/**
* Gets the object type with the given id.
*
if (isset($this->objectTypeIDs[$objectTypeID])) {
return $this->getObjectTypeByName($this->objectTypeIDs[$objectTypeID]);
}
-
+
return null;
}
-
+
/**
* Gets the object type with the given name.
*
if (isset($this->objectTypes[$objectTypeName])) {
return $this->objectTypes[$objectTypeName];
}
-
+
return null;
}
-
+
/**
* @see wcf\system\SingletonFactory::init()
*/
$this->versions = VersionCacheBuilder::getInstance()->getData(array(), 'versions');
$this->versionIDs = VersionCacheBuilder::getInstance()->getData(array(), 'versionIDs');
}
-
+
/**
* Reloads the version cache.
*/
public function reloadCache() {
VersionCacheBuilder::getInstance()->reset();
-
+
$this->init();
}