Skip to content

Commit

Permalink
Added addPlugin() with TextTemplatePlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
matthes committed Mar 28, 2018
1 parent 068dd05 commit 99c3611
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/TextTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ public function addFunction ($functionName, callable $callback) {
return $this;
}

public function addPlugin (TextTemplatePlugin $plugin)
{
$plugin->registerPlugin($this);
}

/**
* Register all public Functions from an Object
*
Expand Down
15 changes: 15 additions & 0 deletions src/TextTemplatePlugin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php
/**
* Created by PhpStorm.
* User: matthes
* Date: 28.03.18
* Time: 15:05
*/

namespace Leuffen\TextTemplate;


interface TextTemplatePlugin
{
public function registerPlugin (TextTemplate $textTemplate);
}

0 comments on commit 99c3611

Please sign in to comment.