Skip to content

Commit

Permalink
Added new IViewSettable interface to replace in near future iModuleVi…
Browse files Browse the repository at this point in the history
…ewable
  • Loading branch information
vitalyiegorov committed Dec 12, 2014
1 parent bd80d49 commit f0e0dae
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/IViewSettable.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php
/**
* Created by PhpStorm.
* User: egorov
* Date: 12.12.2014
* Time: 11:23
*/

namespace samson\core;

/**
* Interface for giving an object ability to be passed
* to IViewable for rendering
* @package samson\core
* @author Vitaly Iegorov <egorov@samsonos.com>
*/
interface IViewSettable
{
/**
* Generate collection of view variables, prefixed if needed, that should be passed to
* view context.
*
* @param string $prefix Prefix to be added to all keys in returned data collection
* @return array Collection(key => value) of data for view context
*/
public function toView($prefix = '');
}
1 change: 1 addition & 0 deletions src/IViewable.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* Generic view rendering interface defining
* all main view context operations.
* @package samson\core
* @author Vitaly Iegorov <egorov@samsonos.com>
*/
interface IViewable
{
Expand Down

0 comments on commit f0e0dae

Please sign in to comment.