class vB_Utility_PageRestore

vB_Utility_PageRestore

Traits

Properties

protected string $xmldir Directory to look for the XML files in.
protected array $fileVersions Array of filenames and their versions to display to the user.
protected array $xml Array of parsed XML information read from files.
protected object $assertor Database assertor object

Methods

__sleep()

No description

__wakeup()

No description

__construct(string $xmldir)

Constructor

loadXmlFile(string $itemname)

Loads and parses an XML file into the $this->xml property.

getPageTitleByGuid(string $guid)

Returns the phrased page title based on the GUID

array
getFileVersions()

Returns the array of file names and versions for display to user.

array
getPageFromXmlByGuid(string $guid)

Returns the page array from the XML file, based on the passed GUID

array
getPagesFromXml()

Returns an array of all pages from the XML file.

array
getMatchingPageFromDbByXmlGuid(string $guid)

Returns an array of page information for the matching page. The page is matched based on the route "name". If no route name is available, it is matched based on the page GUID.

array
getXmlRouteByPageGuid(string $guid)

Returns a route array from the XML file. The route is matched from the passed Page GUID.

array
getDbRouteByRouteId(int $routeid)

Returns a route array from the database

array
getXmlPageTemplateByPageGuid(string $guid)

Returns a page template array from the XML file. The page template is matched from the passed Page GUID.

array
getDbPageTemplateByPageTemplateId(int $pagetemplateid)

Returns a page template array from the database

restorePage(string $guid, bool $printMessage = true)

Restores a page.

Details

in vB_Trait_NoSerialize at line 15
__sleep()

in vB_Trait_NoSerialize at line 20
__wakeup()

at line 54
__construct(string $xmldir)

Constructor

Parameters

string $xmldir Directory where the XML files are located

at line 72
protected loadXmlFile(string $itemname)

Loads and parses an XML file into the $this->xml property.

Parameters

string $itemname The name of the item (page, route, pagetemplate) to load

at line 93
getPageTitleByGuid(string $guid)

Returns the phrased page title based on the GUID

Parameters

string $guid Page GUID

at line 107
array getFileVersions()

Returns the array of file names and versions for display to user.

Return Value

array File names and versions

at line 125
array getPageFromXmlByGuid(string $guid)

Returns the page array from the XML file, based on the passed GUID

Parameters

string $guid Page GUID

Return Value

array Array of page information from the XML file

at line 137
array getPagesFromXml()

Returns an array of all pages from the XML file.

Return Value

array Array of page information from the XML file

at line 151
array getMatchingPageFromDbByXmlGuid(string $guid)

Returns an array of page information for the matching page. The page is matched based on the route "name". If no route name is available, it is matched based on the page GUID.

Parameters

string $guid Page GUID

Return Value

array Array of page information from the database

at line 178
array getXmlRouteByPageGuid(string $guid)

Returns a route array from the XML file. The route is matched from the passed Page GUID.

Parameters

string $guid Page GUID

Return Value

array Array of route information from the XML file

at line 192
array getDbRouteByRouteId(int $routeid)

Returns a route array from the database

Parameters

int $routeid Route ID

Return Value

array Array of route information from the database

at line 205
array getXmlPageTemplateByPageGuid(string $guid)

Returns a page template array from the XML file. The page template is matched from the passed Page GUID.

Parameters

string $guid Page GUID

Return Value

array Array of page template information from the XML file

at line 219
array getDbPageTemplateByPageTemplateId(int $pagetemplateid)

Returns a page template array from the database

Parameters

int $pagetemplateid Page template ID

Return Value

array Array of page template information from the database

at line 234
restorePage(string $guid, bool $printMessage = true)

Restores a page.

Specifically, this restores the page, page template, and route information so it reflects the values present at initial install. This is meant to be used only on the vBulletin default pages.

Parameters

string $guid Page GUID
bool $printMessage Print the Page title or not