KWeb  6.4
ContentBlock Class Reference

Class for creation and storage of content blocks. More...

Public Member Functions

 start ($id=false, $restart=false)
 Starts a content block.
 cancel ()
 Cancels all currently active blocks.
 end ($append=true, $returnWholeBlock=false)
 getBlock ($id, $clear=false)
 Returns stored black.
 printBlock ($id, $clear=true)
 isInBlock ()

Static Public Member Functions

static instance ($create=true)

Static Public Attributes

static $inst = null

Protected Member Functions

 __construct ()

Protected Attributes

 $blockStack = array()
 $blocks = array()
 $wasCanceled = false

Detailed Description

Class for creation and storage of content blocks.


Constructor & Destructor Documentation

ContentBlock::__construct ( ) [protected]

Member Function Documentation

ContentBlock::cancel ( )

Cancels all currently active blocks.

Their result won't be stored

ContentBlock::end ( append = true,
returnWholeBlock = false 
)
Parameters:
$append- TRUE to append the data to previously stored block
$returnWholeBlock- TRUE to return whole block, FALSE to return only newly created data
ContentBlock::getBlock ( id,
clear = false 
)

Returns stored black.

static ContentBlock::instance ( create = true) [static]
Returns:
ContentBlock
ContentBlock::isInBlock ( )
Returns:
string|boolean Returns current block id, or true if block is anonymous
ContentBlock::printBlock ( id,
clear = true 
)
ContentBlock::start ( id = false,
restart = false 
)

Starts a content block.

Parameters:
$id- unique id of the block, or false for anonymous block
$restart- TRUE to clear previously stored data in this block. In case of new block cancellation, old contents will be lost

Field Documentation

ContentBlock::$blocks = array() [protected]
ContentBlock::$blockStack = array() [protected]
ContentBlock::$inst = null [static]
ContentBlock::$wasCanceled = false [protected]

The documentation for this class was generated from the following file: