mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 09:31:51 +01:00
RenderableInterface > something that may be rendered
This commit is contained in:
@@ -8,6 +8,7 @@ Common and useful classes, methods, exceptions etc.
|
|||||||
character class at offset 4" bug
|
character class at offset 4" bug
|
||||||
2. Collection/storage of templates
|
2. Collection/storage of templates
|
||||||
3. Template with placeholders that may be filled by real data
|
3. Template with placeholders that may be filled by real data
|
||||||
|
4. RenderableInterface > something that may be rendered
|
||||||
|
|
||||||
# 1.0.0
|
# 1.0.0
|
||||||
|
|
||||||
|
|||||||
31
src/Renderable/RenderableInterface.php
Normal file
31
src/Renderable/RenderableInterface.php
Normal 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;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user