當前位置: 首頁>>代碼示例>>PHP>>正文


PHP rex_file::getOutput方法代碼示例

本文整理匯總了PHP中rex_file::getOutput方法的典型用法代碼示例。如果您正苦於以下問題:PHP rex_file::getOutput方法的具體用法?PHP rex_file::getOutput怎麽用?PHP rex_file::getOutput使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在rex_file的用法示例。


在下文中一共展示了rex_file::getOutput方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: replaceVars

 static function replaceVars($template, $er = array())
 {
     $r = rex_extension::registerPoint(new rex_extension_point('YFORM_EMAIL_BEFORE_REPLACEVARS', ['template' => $template, 'search_replace' => $er, 'status' => false]));
     $template = $r['template'];
     $er = $r['search_replace'];
     $status = $r['status'];
     if ($status) {
         return true;
     }
     $er['REX_SERVER'] = rex::getServer();
     $er['REX_ERROR_EMAIL'] = rex::getErrorEmail();
     $er['REX_SERVERNAME'] = rex::getServerName();
     $er['REX_NOTFOUND_ARTICLE_ID'] = rex_article::getNotfoundArticleId();
     $er['REX_ARTICLE_ID'] = rex_article::getCurrentId();
     $template['body'] = rex_var::parse($template['body'], '', 'yform_email_template', $er);
     $template['body_html'] = rex_var::parse($template['body_html'], '', 'yform_email_template', $er);
     // rex_vars bug: sonst wird der Zeilenumbruch entfernt - wenn DATA_VAR am Ende einer Zeile
     if (rex_string::versionCompare(rex::getVersion(), '5.0.1', '<')) {
         $template['body'] = str_replace("?>\r", "?>\r\n\r", $template['body']);
         $template['body'] = str_replace("?>\n", "?>\n\r\n", $template['body']);
         $template['body_html'] = str_replace("?>\r", "?>\r\n\r", $template['body_html']);
         $template['body_html'] = str_replace("?>\n", "?>\n\r\n", $template['body_html']);
     }
     $template['body'] = rex_file::getOutput(rex_stream::factory('yform/email/template/' . $template['name'] . '/body', $template['body']));
     $template['body_html'] = rex_file::getOutput(rex_stream::factory('yform/email/template/' . $template['name'] . '/body_html', $template['body_html']));
     return $template;
 }
開發者ID:VIEWSION,項目名稱:redaxo_yform,代碼行數:27,代碼來源:yform_email_template.php

示例2: getParseOutput

 protected function getParseOutput($content)
 {
     return rex_file::getOutput(rex_stream::factory('rex-var-test', rex_var::parse($content)));
 }
開發者ID:staabm,項目名稱:redaxo,代碼行數:4,代碼來源:var_base_test.php

示例3: testGetOutput

 public function testGetOutput()
 {
     $file = $this->getPath('test.php');
     rex_file::put($file, 'a<?php echo "b";');
     $this->assertEquals('ab', rex_file::getOutput($file), 'getOutput() returns the executed content');
 }
開發者ID:staabm,項目名稱:redaxo,代碼行數:6,代碼來源:file_test.php

示例4: foreach

<?php

$content = rex_file::getOutput(rex_path::plugin('be_style', 'redaxo', 'assets/css/styles.css'));
preg_match_all('@\\.rex-icon-(\\w+):before@im', $content, $matches, PREG_SET_ORDER);
$icons_used = '';
if (count($matches) > 0) {
    $list = [];
    foreach ($matches as $match) {
        $list[$match[1]] = '<li><i class="rex-icon rex-icon-' . $match[1] . '"></i> rex-icon-' . $match[1] . '</li>';
    }
    ksort($list);
    $icons_used = '<ul class="rex-list-inline">' . implode('', $list) . '</ul>';
}
preg_match_all('@\\.fa-(\\w+):before@im', $content, $matches, PREG_SET_ORDER);
$icons_complete = '';
if (count($matches) > 0) {
    $list = [];
    foreach ($matches as $match) {
        $list[$match[1]] = '<li><i class="fa fa-' . $match[1] . '"></i> fa-' . $match[1] . '</li>';
    }
    ksort($list);
    $icons_complete = '<ul class="rex-list-inline">' . implode('', $list) . '</ul>';
}
$fragment = new rex_fragment();
$fragment->setVar('content', '<h3>REDAXO Icons</h3>' . $icons_used, false);
echo $fragment->parse('core/page/section.php');
$fragment = new rex_fragment();
$fragment->setVar('content', '<h3>Font-Awesome Icons</h3>' . $icons_complete, false);
echo $fragment->parse('core/page/section.php');
開發者ID:staabm,項目名稱:redaxo,代碼行數:29,代碼來源:help.php


注:本文中的rex_file::getOutput方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。