コード例 #1
0
 public function testRealExpression7()
 {
     // Expression sent by eXtreme (http://exsite.edigo.pl)
     try {
         $this->opt->compiler->processors['section'] = new optFakeSection();
         $this->opt->compiler->processors['section']->sectionList = array(0 => 'Posts');
         $this->assertEquals('($this->vars[\'gmttime\']-$__Posts_val[\'date\'])/60', $this->opt->compiler->compileExpression('(@gmttime-$Posts.date)/60'));
     } catch (optException $exc) {
         optErrorHandler($exc);
         $this->fail('Exception returned');
     }
 }
コード例 #2
0
        }
        // The displaying command should be located in the last processed form
        $this->tpl->parse('test_multiple_1_1.tpl');
    }
}
try {
    require './include.php';
    $tpl = new optClass();
    $tpl->loadConfig('./config.php');
    $tpl->setMasterPage('master.tpl');
    $validator = new opfValidator();
    $opf = new opfClass($tpl, $validator->defaultParams());
    $opf->createI18n('./');
    $form1 = new form1($opf, 'form1');
    if ($form1->execute()) {
        $tpl->assign('fill_form1', 1);
        $tpl->assign('text', $opf->validator->someText);
        $tpl->parse('test_multiple_1_2.tpl');
    } else {
        $form2 = new form2($opf, 'form2');
        if ($form2->execute()) {
            $tpl->assign('fill_form2', 1);
            $tpl->assign('text', $opf->validator->someText);
            $tpl->parse('test_multiple_1_2.tpl');
        }
    }
} catch (opfException $exception) {
    opfErrorHandler($exception);
} catch (optException $exception) {
    optErrorHandler($exception);
}
コード例 #3
0
function toolsetException($exception)
{
    optErrorHandler($exception);
}