'templates')); echo "

assign 0 (string, null)

"; $val = null; $result = $savant->assign('nullvar', $val); echo "result:
";
print_r($result);
echo "
"; echo "properties:
";
print_r(get_object_vars($savant));
echo "
"; echo "

assign 1 (string, mixed)

"; $result = $savant->assign('variable', 'variable_value'); echo "result:
";
print_r($result);
echo "
"; echo "properties:
";
print_r(get_object_vars($savant));
echo "
"; echo "

assign 2 (array)

"; $result = $savant->assign(array('array1' => 'value1', 'array2' => 'value2')); echo "result:
";
print_r($result);
echo "
"; echo "properties:
";
print_r(get_object_vars($savant));
echo "
"; echo "

assign 3 (object)

"; $object = new StdClass(); $object->obj1 = 'this'; $object->obj2 = 'that'; $object->obj3 = 'other'; $result = $savant->assign($object); echo "result:
";
print_r($result);
echo "
"; echo "properties:
";
print_r(get_object_vars($savant));
echo "
"; echo "

assignRef

"; $reference = 'reference_value'; $result = $savant->assignRef('reference', $reference); echo "result:
";
print_r($result);
echo "
"; echo "properties:
";
print_r(get_object_vars($savant));
echo "
"; /* echo "

assignObject

"; $object = new stdClass(); $result = $savant->assignObject('object', $object); echo "result:
";
print_r($result);
echo "
"; echo "properties:
";
print_r(get_object_vars($savant));
echo "
"; */ echo "

Assign variable without value

"; $result = $savant->assign('variable_without_value'); echo "result:
";
print_r($result);
echo "
"; echo "properties:
";
print_r(get_object_vars($savant));
echo "
"; echo "

Assign reference without value

"; $result = $savant->assignRef('reference_without_value'); echo "result:
";
print_r($result);
echo "
"; echo "properties:
";
print_r(get_object_vars($savant));
echo "
"; /* echo "

Assign object when value is not object

"; $reference3 = 'failed!'; $result = $savant->assignObject('object2', $reference3); echo "result:
";
print_r($result);
echo "
"; echo "properties:
";
print_r(get_object_vars($savant));
echo "
"; */ echo "

Change reference values from logic

"; $reference = 'CHANGED VALUE FROM LOGIC'; echo "properties:
";
print_r(get_object_vars($savant));
echo "
"; echo "

getVars

"; echo "

All

";
print_r($savant->getVars());
echo "
"; echo "

Some

";
print_r($savant->getVars(array('obj1', 'obj2', 'obj3')));
echo "
"; echo "

One

";
print_r($savant->getVars('variable'));
echo "
"; echo "

Nonexistent

";
var_dump($savant->getVars('nosuchvar'));
echo "
"; $savant->display('assign.tpl.php'); echo "

After: $reference

"; ?>