Source for file LimitedScope.php
Documentation is available at LimitedScope.php
6: * @copyright Copyright (c) 2004, 2010 David Grudl
7: * @license http://nettephp.com/license Nette license
8: * @link http://nettephp.com
10: * @package Nette\Loaders
16: * Limited scope for PHP code evaluation and script including.
18: * @copyright Copyright (c) 2004, 2010 David Grudl
19: * @package Nette\Loaders
23: private static $vars;
26: * Static class - cannot be instantiated.
30: throw new LogicException("Cannot instantiate static class " .
get_class($this));
36: * Evaluates code in limited scope.
37: * @param string PHP code
38: * @param array local variables
39: * @return mixed the return value of the evaluated code
41: public static function evaluate(/*$code, array $vars = NULL*/)
54: * Includes script in a limited scope.
55: * @param string file to include
56: * @param array local variables
57: * @return mixed the return value of the included file
59: public static function load(/*$file, array $vars = NULL*/)