use wcf\system\exception\SystemException;
use wcf\system\WCF;
use wcf\util\ClassUtil;
-use wcf\util\StringUtil;
/**
* Abstract class for a list of database objects.
*
* @author Marcel Werk
- * @copyright 2001-2012 WoltLab GmbH
+ * @copyright 2001-2014 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package com.woltlab.wcf
* @subpackage data
/**
* result objects
- * @var array<wcf\data\DatabaseObject>
+ * @var array<\wcf\data\DatabaseObject>
*/
public $objects = array();
public $sqlJoins = '';
/**
- * enables the automatic usage of the qualified shorthand
+ * enables the automatic usage of the qualified shorthand
* @var boolean
*/
public $useQualifiedShorthand = true;
/**
* sql conditions
- * @var wcf\system\database\util\PreparedStatementConditionBuilder
+ * @var \wcf\system\database\util\PreparedStatementConditionBuilder
*/
protected $conditionBuilder = null;
if (empty($this->className)) {
$className = get_called_class();
- if (StringUtil::substring($className, -4) == 'List') {
- $this->className = StringUtil::substring($className, 0, -4);
+ if (mb_substr($className, -4) == 'List') {
+ $this->className = mb_substr($className, 0, -4);
}
}
* @param array<integer> $objectIDs
*/
public function setObjectIDs(array $objectIDs) {
- $this->objectIDs = $objectIDs;
+ $this->objectIDs = array_merge($objectIDs);
}
/**
* Returns the objects of the list.
*
- * @return array<wcf\data\DatabaseObject>
+ * @return array<\wcf\data\DatabaseObject>
*/
public function getObjects() {
return $this->objects;
/**
* Returns the condition builder object.
*
- * @return wcf\system\database\util\PreparedStatementConditionBuilder
+ * @return \wcf\system\database\util\PreparedStatementConditionBuilder
*/
public function getConditionBuilder() {
return $this->conditionBuilder;
}
/**
- * @see wcf\data\ITraversableObject::seekTo()
+ * @see \wcf\data\ITraversableObject::seekTo()
*/
public function seekTo($objectID) {
$this->index = array_search($objectID, $this->indexToObject);
}
/**
- * @see wcf\data\ITraversableObject::search()
+ * @see \wcf\data\ITraversableObject::search()
*/
public function search($objectID) {
try {