From f0e0dae5cb6d42f14683dff0ac375cbcfda791ee Mon Sep 17 00:00:00 2001 From: Vitaly Egorov Date: Fri, 12 Dec 2014 11:27:41 +0200 Subject: [PATCH] Added new IViewSettable interface to replace in near future iModuleViewable --- src/IViewSettable.php | 27 +++++++++++++++++++++++++++ src/IViewable.php | 1 + 2 files changed, 28 insertions(+) create mode 100644 src/IViewSettable.php diff --git a/src/IViewSettable.php b/src/IViewSettable.php new file mode 100644 index 0000000..d81454d --- /dev/null +++ b/src/IViewSettable.php @@ -0,0 +1,27 @@ + + */ +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 = ''); +} diff --git a/src/IViewable.php b/src/IViewable.php index a3f831e..81842a6 100644 --- a/src/IViewable.php +++ b/src/IViewable.php @@ -12,6 +12,7 @@ * Generic view rendering interface defining * all main view context operations. * @package samson\core + * @author Vitaly Iegorov */ interface IViewable {