* @author Jeroen De Dauw < jeroendedauw@gmail.com >
*/
class SiteList extends GenericArrayObject {
-
/**
* Internal site identifiers pointing to their sites offset value.
*
*
* @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 bool
*/
public function isEmpty() {
- return $this->byGlobalId === array();
+ return $this->byGlobalId === [];
}
/**
$group = new self();
/**
- * @var \Site $site
+ * @var Site $site
*/
foreach ( $this as $site ) {
if ( $site->getGroup() === $groupName ) {
* @return array
*/
protected function getSerializationData() {
- //NOTE: When changing the structure, either implement unserialize() to handle the
+ // NOTE: When changing the structure, either implement unserialize() to handle the
// 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
- )
+ ]
);
}
return $serializationData;
}
-
}
-
-/**
- * @deprecated
- */
-class SiteArray extends SiteList {}