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


PHP Render::execute方法代碼示例

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


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

示例1: testExecute

 public function testExecute()
 {
     $name = 'test-name';
     $renderedData = '<html>data</html>';
     $this->requestMock->expects($this->at(0))->method('getParam')->with('component')->willReturn($name);
     $this->requestMock->expects($this->at(1))->method('getParam')->with('name')->willReturn($name);
     $this->responseMock->expects($this->once())->method('appendBody')->with($renderedData);
     $viewMock = $this->getMock('Magento\\Ui\\Form\\Field', ['render'], [], '', false);
     $viewMock->expects($this->once())->method('render')->willReturn($renderedData);
     $this->uiFactoryMock->expects($this->once())->method('createUiComponent')->willReturn($viewMock);
     $this->assertNull($this->render->execute());
 }
開發者ID:,項目名稱:,代碼行數:12,代碼來源:

示例2: run

 public function run()
 {
     $reader = new Reader();
     $render = new Render();
     if (Index::requireIndexing()) {
         $format = $render->attach(new Index());
         $reader->open(Config::xml_file());
         $render->execute($reader);
         $render->detach($format);
     }
     $render->attach($this->format);
     $reader->open(Config::xml_file());
     $render->execute($reader);
 }
開發者ID:marczych,項目名稱:hack-hhvm-docs,代碼行數:14,代碼來源:TestRender.php

示例3: run

 /**
  * Start routing
  */
 public static function run()
 {
     if (!is_file(ROUTER_CACHE_FILE)) {
         crash('The cache-route-file is not exists');
     }
     require_once ROUTER_CACHE_FILE;
     if (!function_exists('getRoute')) {
         crash('Route function "getRoute" does not exists');
     }
     $route = getRoute();
     if (Cache::e_array($route)) {
         crash('Route value is not correct in cache-route-file');
     }
     /**
      * Start finding
      */
     try {
         if (isset($route[URI])) {
             $data = $route[URI];
             throw new Exception();
         }
         $onlyRegexp = array_filter(array_keys($route), function ($element) {
             if (substr($element, 0, 1) === '~') {
                 return true;
             }
             return false;
         });
         foreach ($onlyRegexp as $pattern) {
             if (preg_match($pattern, URI, $match)) {
                 controllerManager::$matchUrl = $match;
                 $data = $route[$pattern];
                 throw new Exception();
             }
         }
     } catch (Exception $e) {
         require_once $controllerPath = WORK_SPACE_FOLDER_PATH . 'controllers' . DS . $data['controller'] . 'Controller.php';
         $render = new Render();
         $render->execute($data, $data['controller'], $controllerPath);
     }
     Render::generate404Error();
 }
開發者ID:stan-coder,項目名稱:online_store,代碼行數:44,代碼來源:routing.php

示例4: parse

 public final function parse($xml)
 {
     $parsed = "";
     $reader = new Reader();
     $render = new Render();
     $reader->XML("<notatag>" . $xml . "</notatag>");
     $this->appendToBuffer = true;
     $render->attach($this);
     $render->execute($reader);
     $this->appendToBuffer = false;
     $parsed = $this->buffer;
     $this->buffer = "";
     return $parsed;
 }
開發者ID:TazeTSchnitzel,項目名稱:phd,代碼行數:14,代碼來源:Format.php

示例5: Render

    return $reader;
}
$render = new Render();
$reader = make_reader();
// Set reader LIBXML options
$readerOpts = 0;
if (Config::process_xincludes()) {
    $readerOpts |= LIBXML_XINCLUDE;
}
// Indexing
if (Index::requireIndexing()) {
    v("Indexing...", VERBOSE_INDEXING);
    // Create indexer
    $format = $render->attach(new Index());
    $reader->open(Config::xml_file(), NULL, $readerOpts);
    $render->execute($reader);
    $render->detach($format);
    v("Indexing done", VERBOSE_INDEXING);
} else {
    v("Skipping indexing", VERBOSE_INDEXING);
}
foreach ((array) Config::package() as $package) {
    $factory = Format_Factory::createFactory($package);
    // Default to all output formats specified by the package
    if (count(Config::output_format()) == 0) {
        Config::set_output_format((array) $factory->getOutputFormats());
    }
    // Register the formats
    foreach (Config::output_format() as $format) {
        $render->attach($factory->createFormat($format));
    }
開發者ID:robertop,項目名稱:phd,代碼行數:31,代碼來源:render.php


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