[ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 <?php 2 3 /** 4 * 5 * Tests default plugins 6 * 7 * @version $Id: 7_include.php 18360 2005-05-26 19:38:09Z mipmip $ 8 * 9 */ 10 11 error_reporting(E_ALL); 12 13 require_once 'Savant2.php'; 14 15 $conf = array( 16 'template_path' => 'templates', 17 'resource_path' => 'resources' 18 ); 19 20 $savant =& new Savant2($conf); 21 22 $array = array( 23 'key0' => 'val0', 24 'key1' => 'val1', 25 'key2' => 'val2', 26 ); 27 28 $var1 = 'variable1'; 29 $var2 = 'variable2'; 30 $var3 = 'variable3'; 31 32 $ref1 = 'reference1'; 33 $ref2 = 'reference2'; 34 $ref3 = 'reference3'; 35 36 // assign vars 37 $savant->assign($var1, $var1); 38 $savant->assign($var2, $var2); 39 $savant->assign($var3, $var3); 40 41 // assigns $array to a variable $set 42 $savant->assign('set', $array); 43 44 // assigns the keys and values of array 45 $savant->assign($array); 46 47 // assign references 48 $savant->assignRef($ref1, $ref1); 49 $savant->assignRef($ref2, $ref2); 50 $savant->assignRef($ref3, $ref3); 51 52 // load the cycle plugin with preset cycle values 53 $savant->loadPlugin( 54 'cycle', 55 array( 56 'values' => array( 57 'lightdark' => array('light', 'dark') 58 ) 59 ) 60 ); 61 62 // run through the template 63 $savant->display('main.tpl.php'); 64 65 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |