-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
577f1e3
commit 67ee050
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
/** | ||
* Created by PhpStorm. | ||
* User: egorov | ||
* Date: 12.12.2014 | ||
* Time: 9:50 | ||
*/ | ||
|
||
namespace samson\core; | ||
|
||
/** | ||
* Generic view rendering interface defining | ||
* all main view context operations. | ||
* @package samson\core | ||
*/ | ||
interface IViewable | ||
{ | ||
/** | ||
* Set view variable | ||
* @param string $key Variable key\prefix for objects and arrays | ||
* @param mixed $value Variable value | ||
* @return IViewable Chaining | ||
*/ | ||
public function set($key, $value); | ||
|
||
/** | ||
* Set current view for rendering. | ||
* Method searches for the shortest matching view path by $pathPattern, | ||
* from loaded views. | ||
* | ||
* @param string $pathPattern Path pattern for view searching | ||
* @return IViewable Chaining | ||
*/ | ||
public function view($pathPattern); | ||
|
||
/** | ||
* Render current view. | ||
* Method uses current view context and outputs rendering | ||
* result. | ||
* | ||
* @return string Rendered view | ||
*/ | ||
public function output(); | ||
} |