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


PHP Engine::getData方法代碼示例

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


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

示例1: __construct

 /**
  * Create new Template instance.
  * @param Engine $engine
  * @param string $name
  */
 public function __construct(Engine $engine, $name)
 {
     set_error_handler(array($this, 'renderErrorHandler'));
     $this->engine = $engine;
     $this->name = new Name($engine, $name);
     $this->data($this->engine->getData($name));
 }
開發者ID:hidayat365,項目名稱:phpindonesia.or.id-membership2,代碼行數:12,代碼來源:Template.php

示例2: loadTemplate

 /**
  * Loads the template.
  *
  * @param string $template The template relative path
  * @param array  $vars     The template variables
  *
  * @throws TemplateNotFoundException    When template does not exist
  * @throws UnsupportedTemplateException When template format is not supported
  *
  * @return TemplateInterface
  */
 public function loadTemplate($template, array $vars = [])
 {
     if (!$this->supports($template)) {
         throw new UnsupportedTemplateException(sprintf('Template %s is not supported by this engine.', $template));
     }
     if (!$this->exists($template)) {
         throw new TemplateNotFoundException(sprintf('Template %s does not exist.', $template));
     }
     return new Template($this->plates->path($template), array_merge($this->plates->getData(), $vars));
 }
開發者ID:Symfomany,項目名稱:laravelcinema,代碼行數:21,代碼來源:PlatesEngineAdapter.php

示例3: __construct

 /**
  * Create new Template instance.
  * @param Engine $engine
  * @param string $name
  */
 public function __construct(Engine $engine, $name)
 {
     $this->engine = $engine;
     $this->name = new Name($engine, $name);
     $this->data($this->engine->getData($name));
 }
開發者ID:joelouisworthington,項目名稱:odesandink,代碼行數:11,代碼來源:Template.php


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