示例#1
0
 function SetOption($o, $v = false, $d = false)
 {
     if (!is_array($o)) {
         $o = array($o => $v);
     }
     if (isset($o['var_prefix'])) {
         $this->VarPrefix = $o['var_prefix'];
     }
     if (isset($o['fct_prefix'])) {
         $this->FctPrefix = $o['fct_prefix'];
     }
     if (isset($o['noerr'])) {
         $this->NoErr = $o['noerr'];
     }
     if (isset($o['old_subtemplate'])) {
         $this->OldSubTpl = $o['old_subtemplate'];
     }
     if (isset($o['auto_merge'])) {
         $this->OnLoad = $o['auto_merge'];
         $this->OnShow = $o['auto_merge'];
     }
     if (isset($o['onload'])) {
         $this->OnLoad = $o['onload'];
     }
     if (isset($o['onshow'])) {
         $this->OnShow = $o['onshow'];
     }
     if (isset($o['att_delim'])) {
         $this->AttDelim = $o['att_delim'];
     }
     if (isset($o['protect'])) {
         $this->Protect = $o['protect'];
     }
     if (isset($o['turbo_block'])) {
         $this->TurboBlock = $o['turbo_block'];
     }
     if (isset($o['charset'])) {
         $this->meth_Misc_Charset($o['charset']);
     }
     $UpdateChr = false;
     if (isset($o['chr_open'])) {
         $this->_ChrOpen = $o['chr_open'];
         $UpdateChr = true;
     }
     if (isset($o['chr_close'])) {
         $this->_ChrClose = $o['chr_close'];
         $UpdateChr = true;
     }
     if ($UpdateChr) {
         $this->_ChrVal = $this->_ChrOpen . 'val' . $this->_ChrClose;
         $this->_ChrProtect = '&#' . ord($this->_ChrOpen[0]) . ';' . substr($this->_ChrOpen, 1);
     }
     if (array_key_exists('tpl_frms', $o)) {
         clsTinyButStrong::f_Misc_UpdateArray($GLOBALS['_TBS_FormatLst'], 'frm', $o['tpl_frms'], $d);
     }
     if (array_key_exists('block_alias', $o)) {
         clsTinyButStrong::f_Misc_UpdateArray($GLOBALS['_TBS_BlockAlias'], false, $o['block_alias'], $d);
     }
     if (array_key_exists('parallel_conf', $o)) {
         clsTinyButStrong::f_Misc_UpdateArray($GLOBALS['_TBS_ParallelLst'], false, $o['parallel_conf'], $d);
     }
     if (array_key_exists('include_path', $o)) {
         clsTinyButStrong::f_Misc_UpdateArray($this->IncludePath, true, $o['include_path'], $d);
     }
     if (isset($o['render'])) {
         $this->Render = $o['render'];
     }
     if (isset($o['methods_allowed'])) {
         $this->MethodsAllowed = $o['methods_allowed'];
     }
 }