/** * output the default template with the editing facilities. * * @return none * @access public */ function outputDefaultTemplate() { $o = array('compileDir' => ini_get('session.save_path') . '/Fly_Flexy_Translate', 'templateDir' => dirname(__FILE__) . '/templates'); $x = new Fly_Flexy($o); $x->compile('translator.html'); $x->outputObject($this); }
/** * output a template (optionally with flexy object & element.) * * @param string name of flexy template. * @param object object as per Fly_Flexy:outputObject * @param array elements array as per Fly_Flexy:outputObject * * @return none * @access public */ function display($templatename, $object = null, $elements = array()) { // some standard stuff available to a smarty template.. $this->vars['SCRIPT_NAME'] = $_SERVER['SCRIPT_NAME']; $o = PEAR::getStaticProperty('Fly_Flexy', 'options'); require_once 'Fly/Flexy.php'; $t = new Fly_Flexy(); $t->compile($templatename); $object = $object !== null ? $object : new StdClass(); foreach ($this->vars as $k => $v) { $object->{$k} = $v; } $t->outputObject($object, $elements); }