Skip to content

Commit

Permalink
Change private template methods in protected
Browse files Browse the repository at this point in the history
Create custom template classes is much easier extending default class
and overriding collect() and/or buildContext()
  • Loading branch information
gmazzap committed May 25, 2015
1 parent c2bf40a commit 51a815b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Template/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,10 @@ public function layoutPath()
* @return string
* @access private
*/
private function collect($path)
protected function collect($path)
{
ob_start();
/** @noinspection PhpIncludeInspection */
require $path;
$this->last_buffer = $this->buffer;
$this->buffer = trim(ob_get_clean());
Expand All @@ -266,7 +267,7 @@ private function collect($path)
* @param array $only
* @return array
*/
private function buildContext(array $data = [], array $only = null)
protected function buildContext(array $data = [], array $only = null)
{
$now = is_null($only)
? $this->data()
Expand Down

0 comments on commit 51a815b

Please sign in to comment.