<?php
/**
* Gedar Template Engine plugin
* @package Gedar
* @subpackage plugins
*/
/**
* Gedar {assign} function
*
* Type: function
* Name: assign
* Purpose: assign a name to a variable and set its value
* @authur Ali masoudi <me@alimasoudi.com>
* @param array $varName
* @param array $varValue
* @param object $gedar
* @return true
*/
function gedar_assign_do($varName,$varValue,&$gedar)
{
if(substr(trim($varValue),0,1)=='$')
$varValue=$gedar->_TplVars[substr(trim($varValue),1)];
$gedar->_TplVars[$varName]=$varValue;
}
?>
|