IP.Board  3.3.0
coreOutput Class Reference
Inheritance diagram for coreOutput:
htmlOutput xmlOutput

Public Member Functions

 __construct (output $output)
 addCanonicalTag ($urlBit, $seoTitle, $seoTemplate)
 addCSS ($type, $data)
 addMetaTag ($tag, $content, $encode=true, $trimLen=500)
 core_fetchApplicationData ()
 core_initiate ()
 core_setOutputType ($type)
 encodeMetaTagContent ($content, $makeUTF8Safe=false)
 getCanonicalUrl ()
 getMetaTags ($tag='')
 setCacheExpirationSeconds ($seconds='')
 setHeaderCode ($code, $status='')

Data Fields

 $_current_page_title = ''

Protected Member Functions

 addToDocumentHead ($type, $data)
 forceDownload ($bool)

Protected Attributes

 $_canonicalUrl
 $_forceDownload = false
 $_headerCode = 200
 $_headerExpire = 0
 $_headerStatus = 'OK'
 $_metaTags = array()
 $_outputType = 'normal'
 $output

Constructor & Destructor Documentation

__construct ( output output)

Constructor We could use 'extends' and build the registry object up but we need to use the output handler attached to the registry to save spawning new handlers for 'output' which will have different variables saved in navigation, addToHead, etc

public

Parameters:
objectRegistry object
Returns:
void

Reimplemented in htmlOutput, and xmlOutput.


Member Function Documentation

addCanonicalTag ( urlBit,
seoTitle,
seoTemplate 
)

Add Canonical Tag $output->addCanonicalTag( 'showtopic=xx', 'my-test-topic', 'showtopic' );

public

Parameters:
stringURL bit (showtopic=x)
stringSEO Title (my-test-topic)
stringSEO Template (showtopic)
Returns:
void
addCSS ( type,
data 
)

Add CSS files

public

Parameters:
stringinline or import
stringData to add
Returns:
void
addMetaTag ( tag,
content,
encode = true,
trimLen = 500 
)

Add meta tag $output->addMetaTag( 'description', 'This is a short description' );

Parameters:
string$tagTag name
string$contentTag content
boolean$encodeEncode content
integer$trimLenLength to trim to (default 500)
Returns:
void
See Also:
http://community.invisionpower.com/tracker/issue-22826-case-sensitivity-in-meta-tags/
See Also:
http://community.invisionpower.com/tracker/issue-32572-bbcode-included-in-meta-description
addToDocumentHead ( type,
data 
) [protected]

Add items into the document head Simple redirect function

protected

Parameters:
stringType of head item
mixedData
Returns:
null

Fetch navigation tabs

Returns:
array

initiate Function to do global stuff

Returns:
void
core_setOutputType ( type)

Set output type

Parameters:
string$typeOutput type
Returns:
void
encodeMetaTagContent ( content,
makeUTF8Safe = false 
)

Encodes meta tag content so its safe for readers, etc

Parameters:
string$contentMeta tag content
Returns:
string
forceDownload ( bool) [protected]

Set forced download mode

protected

Parameters:
boolean

Fetch Canonical Tag

Returns:
mixed String if an url is availble otherwise FALSE
getMetaTags ( tag = '')

Retrieve meta tags

$output->getMetaTags( 'description' ); $output->getMetaTags();

Parameters:
string$tagTag name (optional)
Returns:
mixed Array of meta tags, or meta tag specified if tag name is supplied
setCacheExpirationSeconds ( seconds = '')

Set the cache expiration in seconds

public

Parameters:
intSeconds to expire (60 == 1 minute, etc)
setHeaderCode ( code,
status = '' 
)

Set the header code

public

Parameters:
intHeader code (200/301, etc)
string[Optional status if omitted, the function will best guess]

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables