FEATURE #2350 @2h: add pipeline for displaying content

This commit is contained in:
Michal Kváček
2017-03-08 23:38:37 +01:00
parent 44fb6b1be5
commit 450000fadd
10 changed files with 222 additions and 11 deletions
@@ -0,0 +1,17 @@
<?php
namespace App\CMS\Contracts\Content\DisplayPipeline;
use App\Models\Content\Content;
interface Pipeline {
/**
* Add new process into pipeline
*
* @param Process $proces
*
* @return mixed
*
*/
function add($process);
function run(Content $page);
}
@@ -0,0 +1,15 @@
<?php
namespace App\CMS\Contracts\Content\DisplayPipeline;
use App\Models\Content\Content;
interface Process {
/**
* Process and modify given page
*
* @param Content $page
*
* @return mixed
*/
function handle(Content & $page);
}