Skip to content

Commit

Permalink
MacroSet: removed static function install() (BC break)
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed May 24, 2014
1 parent d52588d commit e15297e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
6 changes: 0 additions & 6 deletions src/Latte/Macros/MacroSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ public function addMacro($name, $begin, $end = NULL, $attr = NULL)
}


public static function install(Latte\Compiler $compiler)
{
return new static($compiler);
}


/**
* Initializes before template parsing.
* @return void
Expand Down
7 changes: 4 additions & 3 deletions tests/Latte/macros.use.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ require __DIR__ . '/../bootstrap.php';

class MyMacros extends Latte\Macros\MacroSet
{
public function __construct($compiler)
public static function install($compiler)
{
parent::__construct($compiler);
$this->addMacro('my', 'echo "ok"');
$me = new static($compiler);
$me->addMacro('my', 'echo "ok"');
return $me;
}
}

Expand Down

0 comments on commit e15297e

Please sign in to comment.