PEAR Manual
Prev |  | Next

# setCurrentBlock()

setCurrentBlock() -- Sets the name of the current block.

## Synopsis

    require_once 'HTML/Template/Sigma.php';

``mixed HTML_Template_Sigma::setCurrentBlock` ([string $block = '__global__'])`

## Description

Sets the name of the current block: the one in which variables will be substituted.

## Parameter

string `$block`

  block name

## Return value

return SIGMA_OK on success, error object on failure

## Throws

Table 41-1. Possible PEAR_Error values

Error code | Error message | Reason | Solution
--- | --- | --- | ---
`SIGMA_BLOCK_NOT_FOUND` | Cannot find block '`$block`' | There is no block `$block` in the template | Check the block name spelling, check whether you added all the necessary blocks to the template

## Note

This function can not be called statically.

Prev | Home | Next
setCallbackFunction() | Up | setGlobalVariable()