* @file
* @ingroup Site
*
- * @license GNU GPL v2+
+ * @license GPL-2.0-or-later
* @author Jeroen De Dauw < jeroendedauw@gmail.com >
*/
class SiteList extends GenericArrayObject {
*
* @var array Array of integer
*/
- protected $byInternalId = array();
+ protected $byInternalId = [];
/**
* Global site identifiers pointing to their sites offset value.
*
* @var array Array of string
*/
- protected $byGlobalId = array();
+ protected $byGlobalId = [];
/**
* Navigational site identifiers alias inter-language prefixes
*
* @var array Array of string
*/
- protected $byNavigationId = array();
+ protected $byNavigationId = [];
/**
* @see GenericArrayObject::getObjectType
* @return string
*/
public function getObjectType() {
- return 'Site';
+ return Site::class;
}
/**
* @return bool
*/
public function isEmpty() {
- return $this->byGlobalId === array();
+ return $this->byGlobalId === [];
}
/**
// old structure too, or update SERIAL_VERSION_ID to kill any caches.
return array_merge(
parent::getSerializationData(),
- array(
+ [
'internalIds' => $this->byInternalId,
'globalIds' => $this->byGlobalId,
'navigationIds' => $this->byNavigationId
- )
+ ]
);
}