Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Commit

Permalink
Issue #64: Add TemplateContextInterface::getSource()
Browse files Browse the repository at this point in the history
  • Loading branch information
johanjanssens committed May 3, 2016
1 parent 8ae5bfe commit 5607b49
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
21 changes: 21 additions & 0 deletions code/template/context/context.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,27 @@ public function getData()
return ObjectConfig::get('data');
}

/**
* Set the template source
*
* @param string $source
* @return TemplateContext
*/
public function setSource($source)
{
return ObjectConfig::set('source', $source);
}

/**
* Get the template source
*
* @return string
*/
public function getSource()
{
return ObjectConfig::get('source');
}

/**
* Set the view parameters
*
Expand Down
11 changes: 9 additions & 2 deletions code/template/context/interface.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,21 @@
interface TemplateContextInterface extends CommandInterface
{
/**
* Get the view data
* Get the template data
*
* @return array
*/
public function getData();

/**
* Get the view parameters
* Get the template source
*
* @return array
*/
public function getSource();

/**
* Get the template parameters
*
* @return array
*/
Expand Down

0 comments on commit 5607b49

Please sign in to comment.