MediaWiki REL1_39
|
Gives access to properties of a page. More...
Public Member Functions | |
__construct (LinkBatchFactory $linkBatchFactory, ILoadBalancer $loadBalancer) | |
ensureCacheSize ( $size) | |
Ensure that cache has at least this size. | |
getAllProperties ( $titles) | |
Get all page property values. | |
getProperties ( $titles, $propertyNames) | |
Given one or more Titles and one or more names of properties, returns an associative array mapping page ID to property value. | |
Static Public Member Functions | |
static | getInstance () |
PageProps::__construct | ( | LinkBatchFactory | $linkBatchFactory, |
ILoadBalancer | $loadBalancer ) |
LinkBatchFactory | $linkBatchFactory | |
ILoadBalancer | $loadBalancer |
Definition at line 63 of file PageProps.php.
PageProps::ensureCacheSize | ( | $size | ) |
Ensure that cache has at least this size.
int | $size |
Definition at line 76 of file PageProps.php.
PageProps::getAllProperties | ( | $titles | ) |
Get all page property values.
Given one or more Titles, returns an associative array mapping page ID to an associative array mapping property names to property values. Pages in the provided set of Titles that do not have any properties will not appear in the returned array. If a single Title is provided, it does not need to be passed in an array, but an array will always be returned. An empty array will be returned if no matching properties were found.
iterable<PageIdentity>|PageIdentity | $titles |
Definition at line 162 of file PageProps.php.
References DB_REPLICA.
|
static |
Definition at line 54 of file PageProps.php.
References wfDeprecated().
PageProps::getProperties | ( | $titles, | |
$propertyNames ) |
Given one or more Titles and one or more names of properties, returns an associative array mapping page ID to property value.
Pages in the provided set of Titles that do not have a value for the given properties will not appear in the returned array. If a single Title is provided, it does not need to be passed in an array, but an array will always be returned. If a single property name is provided, it does not need to be passed in an array. In that case, an associative array mapping page ID to property value will be returned; otherwise, an associative array mapping page ID to an associative array mapping property name to property value will be returned. An empty array will be returned if no matching properties were found.
iterable<PageIdentity>|PageIdentity | $titles | |
string[] | string | $propertyNames |
Definition at line 100 of file PageProps.php.
References DB_REPLICA.