Skip to content
This repository has been archived by the owner on Aug 13, 2020. It is now read-only.

Commit

Permalink
Fixed plugin locations
Browse files Browse the repository at this point in the history
  • Loading branch information
josephspurrier committed May 3, 2014
1 parent e651172 commit 55f5acb
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 1 deletion.
11 changes: 11 additions & 0 deletions src/SurfStack/Templating/Plugin/Bold.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace SurfStack\Templating\Plugin;

class Bold extends Block
{
function render($strContent, $arrData)
{
return '<strong>'.$strContent.'</strong> '.$arrData['name'];
}
}
11 changes: 11 additions & 0 deletions src/SurfStack/Templating/Plugin/Time.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace SurfStack\Templating\Plugin;

class Time extends Slice
{
function render($arrData)
{
return date('Y');
}
}
1 change: 0 additions & 1 deletion src/SurfStack/Templating/Template_Engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,6 @@ protected function callPluginDynamic(array $matches)

if(preg_match_all('/(\w+=\'[^\']*\'|\w+=\"[^"]*"|\w+=[^\s]*)+/', $pluginData, $m))
{

foreach($m[0] as $key => $k)
{
$arrSplit = explode('=', $k);
Expand Down
6 changes: 6 additions & 0 deletions tests/SurfStack/Templating/plugin/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
*/
abstract class Block
{
/**
* Array of settings from Template Engine
* @var array
*/
public $internal = array();

/**
* Called by the template, expects a return value
* @param string $strContent
Expand Down
6 changes: 6 additions & 0 deletions tests/SurfStack/Templating/plugin/Slice.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
*/
abstract class Slice
{
/**
* Array of settings from Template Engine
* @var array
*/
public $internal = array();

/**
* Called by the template, expects a return value
* @param array $arrData
Expand Down

0 comments on commit 55f5acb

Please sign in to comment.