Page MenuHomeWickedGov Phorge

MobileCollection.php
No OneTemporary

Size
927 B
Referenced Files
None
Subscribers
None

MobileCollection.php

<?php
namespace MobileFrontend\Models;
use ArrayIterator;
use Countable;
use IteratorAggregate;
use MediaWiki\Libs\Emptiable;
/**
* A collection of pages, which are represented by the MobilePage class.
*/
class MobileCollection implements IteratorAggregate, Countable, Emptiable {
/**
* The internal collection of pages.
*
* @var MobilePage[]
*/
protected $pages = [];
/**
* Return size of the collection
* @return int
*/
public function count(): int {
return count( $this->pages );
}
/**
* Return size of the collection
* @return bool
*/
public function isEmpty() {
return !$this->pages;
}
/**
* Adds a page to the collection.
*
* @param MobilePage $page Page to add
*/
public function add( MobilePage $page ) {
$this->pages[] = $page;
}
/**
* @return ArrayIterator
*/
public function getIterator(): ArrayIterator {
return new ArrayIterator( $this->pages );
}
}

File Metadata

Mime Type
text/x-php
Expires
Aug 17 2026, 14:18 (10 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
cc/f7/8fdba754e13324239b6f09ca8a01
Default Alt Text
MobileCollection.php (927 B)

Event Timeline