Caution: This documentation is for eZ Publish legacy, from version 3.x to 6.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

undef

Summary

Destroys previously defined variable(s).

Usage

{undef [ $var1 [ ... ] ]}

Parameters

NameTypeDescriptionRequired
var1 string The name of the variable that should be destroyed ($-notation). No.

Description

This function destroys variables that have previously been created using the "def" function. The names of the variables that should be destroyed can be provided as parameters. If no parameters are specified, the function will automatically get rid of all variables that were previously defined within the current/same namespace.

Examples

Example 1

{def $a=1 $b=2 $c=3}
...
{undef}

This example demonstrates how the "undef" function can be used to clean up / get rid of a previously the variables that were previously created using the "def" function .

Example 2

{def $a=1 $b=2 $c=3}
...
{undef $b}

This example demonstrates how the "undef" function can be used to clean up / get rid of a previously created variable. The variables $a and $c will not be destroyed.

Balazs Halasy (28/02/2005 1:39 pm)

Balazs Halasy (28/04/2005 2:10 pm)


Comments

There are no comments.