vB_External_Export_Js
extends vB_External_Export
in package
Table of Contents
- $headers : mixed
- $internaloptions : mixed
- $options : mixed
- $outputContentType : mixed
- $outputdata : mixed
- $type : mixed
- $threadObj : mixed
- __serialize() : mixed
- __sleep() : mixed
- __unserialize() : mixed
- __wakeup() : mixed
- formatItems() : array<string|int, mixed>
- Formats fields if needed regarding the options.
- getCacheHash() : string
- Creates a cachehash from given options.
- getHeaders() : mixed
- Common getter.
- getHeadersFromLastOutput() : mixed
- Get a list of valid headers values from last external provider output and data specified.
- getInternalOptions() : mixed
- Common getter
- getOptions() : mixed
- Common getter
- output() : mixed
- Builds an output regarding the implementation type.
- buildOutputFromItems() : string
- Builds an output based on the type from a given list of items (nodes) and options being passed.
- callvBDate() : mixed
- 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.
- getHeadersFromData() : array<string|int, mixed>
- Get a list of valid headers values from data specified. (vB_External_Export::$headers).
- getItemList() : mixed
- setHeaderData() : array<string|int, mixed>
- Set headers data for external data provider from given data.
- setOptionsData() : mixed
- Make sure default options are always being properly set.
- setOutputData() : mixed
- Set information for output being created from the items.
Properties
$headers
protected
mixed
$headers
= array('Pragma' => B_Cleaner::TYPE_NOCLEAN, 'Cache-Control' => B_Cleaner::TYPE_UNIXTIME, 'Expires' => B_Cleaner::TYPE_UNIXTIME, 'Last-Modified' => B_Cleaner::TYPE_UNIXTIME, 'ETag' => B_Cleaner::TYPE_STR, 'Content-Type' => B_Cleaner::TYPE_STR)
Tags
$internaloptions
protected
mixed
$internaloptions
= array('externalcutoff' => B_Cleaner::TYPE_UNIXTIME, 'ttl' => B_Cleaner::TYPE_UINT)
Tags
$options
protected
mixed
$options
= array('nodeid' => B_Cleaner::TYPE_ARRAY_UINT, 'count' => B_Cleaner::TYPE_UINT, 'fulldesc' => B_Cleaner::TYPE_BOOL, 'lastpost' => B_Cleaner::TYPE_BOOL, 'nohtml' => B_Cleaner::TYPE_BOOL)
Tags
$outputContentType
protected
mixed
$outputContentType
= 'application/javascript'
Tags
$outputdata
protected
mixed
$outputdata
= array()
Tags
$type
protected
mixed
$type
= 'JS'
$threadObj
private
mixed
$threadObj
= "
function thread(threadid, title, poster, threaddate, threadtime)
{
this.threadid = threadid;
this.title = title;
this.poster = poster;
this.threaddate = threaddate;
this.threadtime = threadtime;
}
"
Methods
__serialize()
public
__serialize() : mixed
Return values
mixed —__sleep()
public
__sleep() : mixed
Return values
mixed —__unserialize()
public
__unserialize(mixed $serialized) : mixed
Parameters
- $serialized : mixed
Return values
mixed —__wakeup()
public
__wakeup() : mixed
Return values
mixed —formatItems()
Formats fields if needed regarding the options.
public
formatItems(mixed $items, mixed $options) : array<string|int, mixed>
Parameters
- $items : mixed
- $options : mixed
Return values
array<string|int, mixed> —List of formatted items.
getCacheHash()
Creates a cachehash from given options.
public
getCacheHash(mixed $options) : string
Parameters
- $options : mixed
Return values
string —Cache hash.
getHeaders()
Common getter.
public
getHeaders() : mixed
Return values
mixed —getHeadersFromLastOutput()
Get a list of valid headers values from last external provider output and data specified.
public
getHeadersFromLastOutput(mixed $data) : mixed
Notice this has to be called after output() gets called so needed data gets in place.
Parameters
- $data : mixed
Return values
mixed —getInternalOptions()
Common getter
public
getInternalOptions() : mixed
Return values
mixed —getOptions()
Common getter
public
getOptions() : mixed
Return values
mixed —output()
Builds an output regarding the implementation type.
public
output([mixed $options = array() ]) : mixed
Content from the output is basically content from the site including forum, blogs and groups. Options can be passed optionally.
Parameters
- $options : mixed = array()
Return values
mixed —buildOutputFromItems()
Builds an output based on the type from a given list of items (nodes) and options being passed.
protected
buildOutputFromItems(mixed $items, mixed $options) : string
Parameters
- $items : mixed
- $options : mixed
Return values
string —External data output generated
callvBDate()
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.
protected
callvBDate(mixed $format, mixed $timestamp) : mixed
Parameters
- $format : mixed
- $timestamp : mixed
Return values
mixed —getHeadersFromData()
Get a list of valid headers values from data specified. (vB_External_Export::$headers).
protected
getHeadersFromData(mixed $data) : array<string|int, mixed>
@param array Headers data. Must contain valid 'lastmodified', 'expires', 'cachehash' keys.
Parameters
- $data : mixed
Return values
array<string|int, mixed> —List of valid headers filled out.
getItemList()
protected
getItemList(mixed $options) : mixed
Parameters
- $options : mixed
Return values
mixed —setHeaderData()
Set headers data for external data provider from given data.
protected
setHeaderData(mixed $data) : array<string|int, mixed>
Data must be clean at this point.
Parameters
- $data : mixed
Return values
array<string|int, mixed> —Valid header data.
setOptionsData()
Make sure default options are always being properly set.
protected
setOptionsData(mixed $options) : mixed
Parameters
- $options : mixed
Return values
mixed —setOutputData()
Set information for output being created from the items.
protected
setOutputData(mixed $items, mixed $options) : mixed
Used later for setting headers values (such as cache-control, expires, last-modified and etag).
Parameters
- $items : mixed
- $options : mixed