abstract class vB_External_Export

Traits

Properties

protected $headers
protected $options
protected $internaloptions
protected $outputdata
protected $type

Methods

__sleep()

No description

__wakeup()

No description

__construct()

No description

getItemList($options)

No description

string
buildOutputFromItems(array $items, array $options)

Builds an output based on the type from a given list of items (nodes) and options being passed.

output(array $options = array())

Builds an output regarding the implementation type.

getHeaders()

Common getter.

callvBDate($format, $timestamp)

Mostly a wrapper of vbdate. Adding it since vbdate function should be ported to vB5 standards and we can easier replace when the time comes up.

getOptions()

Common getter

Array
formatItems(Array $items, Array $options)

Formats fields if needed regarding the options.

setOutputData($items, $options)

Set information for output being created from the items.

getHeadersFromLastOutput(array $data)

Get a list of valid headers values from last external provider output and data specified.

array
getHeadersFromData($data)

Get a list of valid headers values from data specified. (vB_External_Export::$headers).

array
setHeaderData(array $data)

Set headers data for external data provider from given data.

getInternalOptions()

Common getter

string
getCacheHash(array $options)

Creates a cachehash from given options.

setOptionsData($options)

Make sure default options are always being properly set.

Details

in vB_Trait_NoSerialize at line 15
__sleep()

in vB_Trait_NoSerialize at line 20
__wakeup()

at line 48
protected __construct()

at line 51
protected getItemList($options)

Parameters

$options

at line 117
protected string buildOutputFromItems(array $items, array $options)

Builds an output based on the type from a given list of items (nodes) and options being passed.

Parameters

array $items List of nodes to build the output.
array $options Options to be consider for external output (self::$options AND self::$internaloptions). self::$options: - nodeid => comma separated ids to fetch content from. - count => number of results. - fulldesc => whether description will be cut off (preview) or full (RSS 1 and 2 only.). - lastpost => whether results will contain information from last post (if any). - nohtml => whether display html or not (RSS 1 and 2 only.). self::$internaloptions: - externalcutoff => days to fetch newer content from. - ttl => time to live for caching external output.

Return Value

string External data output generated

at line 130
output(array $options = array())

Builds an output regarding the implementation type.

Content from the output is basically content from the site including forum, blogs and groups. Options can be passed optionally.

Parameters

array $options List of options to build the output.

@return     string  External data output.

at line 144
getHeaders()

Common getter.

at line 153
protected callvBDate($format, $timestamp)

Mostly a wrapper of vbdate. Adding it since vbdate function should be ported to vB5 standards and we can easier replace when the time comes up.

Parameters

$format
$timestamp

at line 164
getOptions()

Common getter

at line 178
Array formatItems(Array $items, Array $options)

Formats fields if needed regarding the options.

Parameters

Array $items List of items for the external data provider output.
Array $options Options.

Return Value

Array List of formatted items.

at line 205
protected setOutputData($items, $options)

Set information for output being created from the items.

Used later for setting headers values (such as cache-control, expires, last-modified and etag).

Parameters

$items
$options

at line 225
getHeadersFromLastOutput(array $data)

Get a list of valid headers values from last external provider output and data specified.

Notice this has to be called after output() gets called so needed data gets in place.

Parameters

array $data Headers data. Must contain valid 'lastmodified', 'expires', 'cachehash' keys. - Content-Type => charset to consider in output content type.

@return     array   List of valid headers filled out.

at line 243
protected array getHeadersFromData($data)

Get a list of valid headers values from data specified. (vB_External_Export::$headers).

@param array Headers data. Must contain valid 'lastmodified', 'expires', 'cachehash' keys.

Parameters

$data

Return Value

array List of valid headers filled out.

at line 286
protected array setHeaderData(array $data)

Set headers data for external data provider from given data.

Data must be clean at this point.

Parameters

array $data Headers data.

Return Value

array Valid header data.

at line 325
getInternalOptions()

Common getter

at line 338
string getCacheHash(array $options)

Creates a cachehash from given options.

Parameters

array $options Options to build cachehash from.

Return Value

string Cache hash.

at line 360
protected setOptionsData($options)

Make sure default options are always being properly set.

Parameters

$options