Skip to content

Commit

Permalink
LimitedScope is deprecated (BC break!)
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Mar 21, 2014
1 parent 3082909 commit 4ab7e5a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Nette/Utils/LimitedScope.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/**
* Limited scope for PHP code evaluation and script including.
*
* @author David Grudl
* @deprecated
*/
class LimitedScope
{
Expand All @@ -35,6 +35,7 @@ final public function __construct()
*/
public static function evaluate(/*$code, array $vars = NULL*/)
{
trigger_error(__METHOD__ . '() is deprecated.', E_USER_DEPRECATED);
if (func_num_args() > 1) {
foreach (func_get_arg(1) as $__k => $__v) $$__k = $__v;
unset($__k, $__v);
Expand All @@ -55,6 +56,7 @@ public static function evaluate(/*$code, array $vars = NULL*/)
*/
public static function load(/*$file, array $vars = NULL*/)
{
trigger_error(__METHOD__ . '() is deprecated.', E_USER_DEPRECATED);
if (func_num_args() > 1 && is_array(func_get_arg(1))) {
foreach (func_get_arg(1) as $__k => $__v) $$__k = $__v;
unset($__k, $__v);
Expand Down

0 comments on commit 4ab7e5a

Please sign in to comment.