コード例 #1
0
ファイル: AsignacionRUCView.php プロジェクト: elcuy/Novopan
 public function getView($viewId, $placeHolders_p, $additionalVars = array())
 {
     $htmlCode = "";
     switch ($viewId) {
         case "asignacion_ruc":
             $htmlCode = $this->getAsignacionRUCTemplate();
             break;
         case "asignacion_ruc_inner":
             $htmlCode = $this->getAsignacionRUCInnerTemplate();
             break;
         case "asignacion_ruc_linea":
             $htmlCode = $this->getAsignacionRUCLineTemplate();
             break;
     }
     return parseTemplates($htmlCode, $placeHolders_p);
 }
コード例 #2
0
ファイル: EspecialesView.php プロジェクト: elcuy/Novopan
 public function getView($viewId, $placeHolders_p, $additionalVars = array())
 {
     $htmlCode = "";
     switch ($viewId) {
         case "especiales":
             $htmlCode = $this->getEspecialesTemplate();
             break;
         case "especiales_inner":
             $htmlCode = $this->getEspecialesInnerTemplate();
             break;
         case "especiales_linea":
             $htmlCode = $this->getEspecialesLineTemplate();
             break;
     }
     return parseTemplates($htmlCode, $placeHolders_p);
 }
コード例 #3
0
 if (!in_array($testName, $testsToPort, true)) {
     continue;
 }
 // parse test (copy&paste from twig's integrationTest.php)
 $test = file_get_contents($file->getRealpath());
 if (preg_match('/
         --TEST--\\s*(.*?)\\s*(?:--CONDITION--\\s*(.*))?\\s*((?:--TEMPLATE(?:\\(.*?\\))?--(?:.*))+)\\s*--EXCEPTION--\\s*(.*)/sx', $test, $match)) {
     $message = $match[1];
     $condition = $match[2];
     $templates = parseTemplates($match[3]);
     $exception = $match[4];
     $outputs = array();
 } elseif (preg_match('/--TEST--\\s*(.*?)\\s*(?:--CONDITION--\\s*(.*))?\\s*((?:--TEMPLATE(?:\\(.*?\\))?--(?:.*?))+)--DATA--.*?--EXPECT--.*/s', $test, $match)) {
     $message = $match[1];
     $condition = $match[2];
     $templates = parseTemplates($match[3]);
     $exception = false;
     preg_match_all('/--DATA--(.*?)(?:--CONFIG--(.*?))?--EXPECT--(.*?)(?=\\-\\-DATA\\-\\-|$)/s', $test, $outputs, PREG_SET_ORDER);
 } else {
     throw new InvalidArgumentException(sprintf('Test "%s" is not valid.', str_replace($fixturesDir . '/', '', $file)));
 }
 // compile template, and prepare test.html file
 foreach ($templates as $name => $code) {
     $targetPath = $targetDir . '/' . $testName . '/' . $name . '.js';
     @mkdir(dirname($targetPath), 0777, true);
     file_put_contents($targetPath, $handler->process(new TwigJs\CompileRequest($name, $code)));
 }
 foreach ($outputs as $k => $output) {
     $output[3] = trim($output[3]);
     if (0 === $k && 'expressions/array' === $testName) {
         $lines = explode("\n", $output[3]);
コード例 #4
0
ファイル: index.php プロジェクト: laiello/punchcms
     $strOutput .= parseMenu($intCatId, $strCommand);
     $strOutput .= parseUsers($intElmntId, $strCommand);
     break;
 case NAV_MYPUNCH_PROFILE:
     require_once 'includes/inc.tplparse_profile.php';
     $strOutput .= parseMenu($intCatId, $strCommand);
     $strOutput .= parseProfile($intElmntId, $strCommand);
     break;
 case NAV_MYPUNCH_ANNOUNCEMENTS:
     require_once 'includes/inc.tplparse_announcments.php';
     $strOutput .= parseAnnouncment();
     break;
 case NAV_PCMS_TEMPLATES:
     require_once 'includes/inc.tplparse_template.php';
     $strOutput .= parseMenu($intCatId, $strCommand);
     $strOutput .= parseTemplates($intElmntId, $strCommand);
     break;
 case NAV_PCMS_FORMS:
     require_once 'includes/inc.tplparse_form.php';
     $strOutput .= parseMenu($intCatId, $strCommand);
     $strOutput .= parseForms($intElmntId, $strCommand);
     break;
 case NAV_PCMS_STORAGE:
     require_once 'includes/inc.tplparse_storage.php';
     $strOutput .= parseMenu($intCatId, $strCommand);
     $strOutput .= parseFiles($intElmntId, $strCommand);
     break;
 case NAV_PCMS_ALIASES:
     require_once 'includes/inc.tplparse_alias.php';
     $strOutput .= parseMenu($intCatId, $strCommand);
     $strOutput .= parseAlias($intElmntId, $strCommand);