소스 검색

[Templating] added an output() shorcut to the Engine class

Fabien Potencier 15 년 전
부모
커밋
768b5d0904
1개의 변경된 파일13개의 추가작업 그리고 0개의 파일을 삭제
  1. 13 0
      src/Symfony/Components/Templating/Engine.php

+ 13 - 0
src/Symfony/Components/Templating/Engine.php

@@ -132,6 +132,19 @@ class Engine
     return $content;
   }
 
+  /**
+   * Outputs a rendered template.
+   *
+   * @param string $name       A template name
+   * @param array  $parameters An array of parameters to pass to the template
+   *
+   * @see render()
+   */
+  public function output($name, array $parameters = array())
+  {
+    echo $this->render($name, $parameters);
+  }
+
   /**
    * Gets a helper value.
    *