Parsoid
A bidirectional parser between wikitext and HTML5
Loading...
Searching...
No Matches
Wikimedia\Parsoid\Config\PageContent Class Reference

Page content data object. More...

+ Inheritance diagram for Wikimedia\Parsoid\Config\PageContent:

Public Member Functions

 getRoles ()
 Return the roles available in this page.
 
 hasRole (string $role)
 Determine whether the page contains a role.
 
 getModel (string $role)
 Fetch the content model for a role.
 
 getFormat (string $role)
 Fetch the content format for a role.
 
 getContent (string $role)
 Fetch the content for a role.
 

Detailed Description

Page content data object.

Member Function Documentation

◆ getContent()

Wikimedia\Parsoid\Config\PageContent::getContent ( string $role)
abstract

Fetch the content for a role.

Parameters
string$role
Returns
string
Exceptions
InvalidArgumentExceptionif the role doesn't exist

Reimplemented in Wikimedia\Parsoid\Mocks\MockPageContent.

◆ getFormat()

Wikimedia\Parsoid\Config\PageContent::getFormat ( string $role)
abstract

Fetch the content format for a role.

Parameters
string$role
Returns
string
Exceptions
InvalidArgumentExceptionif the role doesn't exist

Reimplemented in Wikimedia\Parsoid\Mocks\MockPageContent.

◆ getModel()

Wikimedia\Parsoid\Config\PageContent::getModel ( string $role)
abstract

Fetch the content model for a role.

Parameters
string$role
Returns
string
Exceptions
InvalidArgumentExceptionif the role doesn't exist

Reimplemented in Wikimedia\Parsoid\Mocks\MockPageContent.

◆ getRoles()

Wikimedia\Parsoid\Config\PageContent::getRoles ( )
abstract

Return the roles available in this page.

Returns
string[]

Reimplemented in Wikimedia\Parsoid\Mocks\MockPageContent.

◆ hasRole()

Wikimedia\Parsoid\Config\PageContent::hasRole ( string $role)
abstract

Determine whether the page contains a role.

Parameters
string$role
Returns
bool

Reimplemented in Wikimedia\Parsoid\Mocks\MockPageContent.


The documentation for this class was generated from the following file: