Class _Cmd_If

Description

Führt den eingeschlossenen Code nur unter einer Bedingung aus.

 {#IF phpexpression}
 {#ELSEIF phpexpression}
 {#ELSE}
 {#END}

Die klassische If-Bedingung inklusive optionalem elseif.

phpexpression ist gültiger PHP-Code, der im Namespace des Templates ausgeführt wird.

Beispiele:

 {#IF $var}foo{#END}
 {#IF !$var}foo{#END}
 {#IF !empty($var)}foo{#END}
 {#IF $var1 == $var2}foo{#END}

Located in /web/mod/mod.template.compiler.php (line 685)

_Cmd
   |
   --_CmdBlock
      |
      --_Cmd_If
Variable Summary
mixed $_ElseCode
mixed $_ElseIf
mixed $_Exp
mixed $_HasElse
mixed $_IfCode
mixed $_Section
Method Summary
void add ( $data)
void compile ( $NSIndex,  $Depth)
void init ( $param)
void isValidSection ( $aName)
void newSection ( $aName,  $aParam)
Variables
mixed $_ElseCode = array() (line 689)
mixed $_ElseIf = array() (line 691)
mixed $_Exp = "" (line 687)
mixed $_HasElse = false (line 692)
mixed $_IfCode = array() (line 688)
mixed $_Section = "" (line 690)
Methods
add (line 701)
void add ( $data)
  • $data

Redefinition of:
_CmdBlock::add()
compile (line 737)
void compile ( $NSIndex,  $Depth)
  • $NSIndex
  • $Depth

Redefinition of:
_Cmd::compile()
init (line 694)
void init ( $param)
  • $param

Redefinition of:
_Cmd::init()
isValidSection (line 732)
void isValidSection ( $aName)
  • $aName

Redefinition of:
_CmdBlock::isValidSection()
newSection (line 711)
void newSection ( $aName,  $aParam)
  • $aName
  • $aParam

Redefinition of:
_CmdBlock::newSection()

Inherited Methods

Inherited From _CmdBlock

_CmdBlock::add()
_CmdBlock::finish()
_CmdBlock::isBlock()
_CmdBlock::isValidSection()
_CmdBlock::newSection()
_CmdBlock::_compileArray()

Inherited From _Cmd

_Cmd::_Cmd()
_Cmd::compile()
_Cmd::getName()
_Cmd::init()
_Cmd::isBlock()
_Cmd::isValidParent()

Documentation generated on Mon, 22 Oct 2007 17:17:27 +0200 by phpDocumentor 1.3.1