|
| __construct (array $data) |
|
| getRoles () |
| Return the roles available in this page.- Returns
- string[]
|
|
| hasRole (string $role) |
| Determine whether the page contains a role.- Parameters
-
- Returns
- bool
|
|
| getModel (string $role) |
| Fetch the content model for a role.- Parameters
-
- Returns
- string
- Exceptions
-
InvalidArgumentException | if the role doesn't exist |
|
|
| getFormat (string $role) |
| Fetch the content format for a role.- Parameters
-
- Returns
- string
- Exceptions
-
InvalidArgumentException | if the role doesn't exist |
|
|
| getContent (string $role) |
| Fetch the content for a role.- Parameters
-
- Returns
- string
- Exceptions
-
InvalidArgumentException | if the role doesn't exist |
|
|
◆ __construct()
Wikimedia\Parsoid\Mocks\MockPageContent::__construct |
( |
array | $data | ) |
|
- Parameters
-
array | $data | Page content data. Keys are roles, values are arrays or strings. A string value is considered as an array [ 'content' => $value ]. Array keys are:
- content: (string) The slot's content.
- contentmodel: (string, default 'wikitext') The slot's content model.
- contentformat: (string, default 'text/x-wiki') The slot's content format.
- redirect: (string, optional) The redirect target (same format as PageConfig::getTitle), if this content is a redirect.
|
◆ getContent()
Wikimedia\Parsoid\Mocks\MockPageContent::getContent |
( |
string | $role | ) |
|
◆ getFormat()
Wikimedia\Parsoid\Mocks\MockPageContent::getFormat |
( |
string | $role | ) |
|
◆ getModel()
Wikimedia\Parsoid\Mocks\MockPageContent::getModel |
( |
string | $role | ) |
|
◆ getRoles()
Wikimedia\Parsoid\Mocks\MockPageContent::getRoles |
( |
| ) |
|
◆ hasRole()
Wikimedia\Parsoid\Mocks\MockPageContent::hasRole |
( |
string | $role | ) |
|
The documentation for this class was generated from the following file:
- src/Mocks/MockPageContent.php