MediaWiki master
|
Gives access to properties of a page. More...
Public Member Functions | |
__construct (LinkBatchFactory $linkBatchFactory, IConnectionProvider $dbProvider) | |
ensureCacheSize ( $size) | |
Ensure that cache has at least this size. | |
getAllProperties ( $titles) | |
Get all page properties of one or more page titles. | |
getProperties ( $titles, $propertyNames) | |
Fetch one or more properties for one or more Titles. | |
MediaWiki\Page\PageProps::__construct | ( | LinkBatchFactory | $linkBatchFactory, |
IConnectionProvider | $dbProvider ) |
LinkBatchFactory | $linkBatchFactory | |
IConnectionProvider | $dbProvider |
Definition at line 49 of file PageProps.php.
MediaWiki\Page\PageProps::ensureCacheSize | ( | $size | ) |
Ensure that cache has at least this size.
int | $size |
Definition at line 62 of file PageProps.php.
MediaWiki\Page\PageProps::getAllProperties | ( | $titles | ) |
Get all page properties of one or more page titles.
Given one or more Titles, returns an array keyed by page ID to another array from property names to property values.
If a single Title is provided without an array, the output will still be returned as an array by page ID.
Pages in the provided set of Titles that do have no page properties, will not get a page ID key in the returned array.
An empty array will be returned if none of the titles have any page properties.
iterable<PageIdentity>|PageIdentity | $titles |
Definition at line 157 of file PageProps.php.
MediaWiki\Page\PageProps::getProperties | ( | $titles, | |
$propertyNames ) |
Fetch one or more properties for one or more Titles.
Returns an associative array mapping page ID to property value.
If a single Title is provided without an array, the output will still be returned as an array by page ID.
Pages in the provided set of Titles that do not have a value for any of the properties will not appear in the returned array.
If a single property name is requested, it does not need to be passed in as an array. In that case, the return array will map directly from page ID to property value. Otherwise, a multi-dimensional array is returned keyed by page ID, then property name, to property value.
An empty array will be returned if no matching properties were found.
iterable<PageIdentity>|PageIdentity | $titles | |
string[] | string | $propertyNames |
Definition at line 91 of file PageProps.php.