RenderableInterface > something that may be rendered

This commit is contained in:
Meritoo
2019-04-02 21:40:31 +02:00
parent a4d6a1c785
commit a93355f2c8
2 changed files with 32 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ Common and useful classes, methods, exceptions etc.
character class at offset 4" bug
2. Collection/storage of templates
3. Template with placeholders that may be filled by real data
4. RenderableInterface > something that may be rendered
# 1.0.0

View File

@@ -0,0 +1,31 @@
<?php
/**
* (c) Meritoo.pl, http://www.meritoo.pl
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Meritoo\Common\Renderable;
use Meritoo\Common\Collection\Templates;
/**
* Something that may be rendered
*
* @author Meritoo <github@meritoo.pl>
* @copyright Meritoo <http://www.meritoo.pl>
*/
interface RenderableInterface
{
/**
* Renders this object using given templates
*
* @param Templates $templates Collection/storage of templates that will be required while rendering this and
* related objects, e.g. children of this object
* @return string
*/
public function render(Templates $templates): string;
}