class vB5_Template_NodeText

Constants

PLACEHOLDER_PREFIX

PLACEHOLDER_SUFFIX

Properties

static protected $instance
protected $cache
protected $pending
protected $bbCodeOptions
protected $placeHolders
protected $contentPages
protected $previewOnly
protected $cacheIdToNodeid
protected $previewLength

Methods

static mixed
instance()

Returns a reference to the singleton instance of this class

fetchOneNodePreview($nodeId, $api = false)

Returns preview info for one node

string
fetchOneNodeText($nodeId, $api = false, $contentPage = 1)

Returns preview info for one node

string
fetchPageTitle($nodeId, $contentPage = 1)

returns the title of a page

mixed
fetchArticlePaging(int $nodeId)

Returns paging information

registerUseridsForAvatarPreloading(array $textDataArray)

Register userids for avatar preloading

doParse($nodeId, $bbCodeOptions, $api, $cache)

No description

string
register($nodeId, $bbCodeOptions = array(), $contentPage = 1)

Registers location for node text, to be filled with the parsed text later.

string
registerPreview($nodeId, $bbCodeOptions = array())

Registers preview for node text, to be filled with the parsed text later.

resetPending()

Resets the array of items pending

string
replacePlaceholders(string $content)

This is the main function, called by the page renderer. It replaces all the placeholders with the parsed content.

getPlaceholder($nodeId, $bbCodeOptions, $contentPage = 1)

No description

getPlaceholderPre($nodeId, $bbCodeOptions)

No description

string
getCacheKey($nodeId, $bbCodeOptions, $preview = false, $canview)

Returns the cache key to be used by vB_Cache

fetchNodeText()

No description

string
getPagingCacheKey(int $nodeid)

gets the key used for storing page information

array
parseNode($textDataArray, $nodeId, $bbcodeOptions)

No description

Details

at line 33
static mixed instance()

Returns a reference to the singleton instance of this class

Return Value

mixed reference to the vB5_Template_NodeText object

at line 51
fetchOneNodePreview($nodeId, $api = false)

Returns preview info for one node

Parameters

$nodeId
$api

at line 114
string fetchOneNodeText($nodeId, $api = false, $contentPage = 1)

Returns preview info for one node

@param int the nodeid to be returned

Parameters

$nodeId
$api
$contentPage

Return Value

string text of the page

at line 193
string fetchPageTitle($nodeId, $contentPage = 1)

returns the title of a page

@param int the nodeid to be returned

Parameters

$nodeId
$contentPage

Return Value

string title of the article page

at line 211
mixed fetchArticlePaging(int $nodeId)

Returns paging information

Parameters

int $nodeId nodeid for which we need information

Return Value

mixed array of int => string.

at line 257
protected registerUseridsForAvatarPreloading(array $textDataArray)

Register userids for avatar preloading

Parameters

array $textDataArray that comes from the getDataForParse API call

at line 277
protected doParse($nodeId, $bbCodeOptions, $api, $cache)

Parameters

$nodeId
$bbCodeOptions
$api
$cache

at line 331
string register($nodeId, $bbCodeOptions = array(), $contentPage = 1)

Registers location for node text, to be filled with the parsed text later.

Parameters

$nodeId
$bbCodeOptions
$contentPage

Return Value

string the placeholder text

at line 390
string registerPreview($nodeId, $bbCodeOptions = array())

Registers preview for node text, to be filled with the parsed text later.

Parameters

$nodeId
$bbCodeOptions

Return Value

string the placeholder text

at line 439
resetPending()

Resets the array of items pending

at line 451
string replacePlaceholders(string $content)

This is the main function, called by the page renderer. It replaces all the placeholders with the parsed content.

Parameters

string $content The page content. This currently will have all the placeholders

Return Value

string Page content with all the placeholders replaced with the parsed text.

at line 480
protected getPlaceholder($nodeId, $bbCodeOptions, $contentPage = 1)

Parameters

$nodeId
$bbCodeOptions
$contentPage

at line 496
protected getPlaceholderPre($nodeId, $bbCodeOptions)

Parameters

$nodeId
$bbCodeOptions

at line 513
protected string getCacheKey($nodeId, $bbCodeOptions, $preview = false, $canview)

Returns the cache key to be used by vB_Cache

Parameters

$nodeId
$bbCodeOptions
$preview
$canview

Return Value

string

at line 533
protected fetchNodeText()

at line 650
protected string getPagingCacheKey(int $nodeid)

gets the key used for storing page information

Parameters

int $nodeid the nodeid

Return Value

string the cache key string

at line 662
protected array parseNode($textDataArray, $nodeId, $bbcodeOptions)

Parameters

$textDataArray
$nodeId
$bbcodeOptions

Return Value

array