Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4073994
MobileCollection.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
927 B
Referenced Files
None
Subscribers
None
MobileCollection.php
View Options
<?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
Details
Attached
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)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment