public function __construct($name, Environment $parent) { parent::__construct($name, $parent); if (!$parent instanceof FunctionEnvironment) { self::copyValueReferences($this->variables, $parent->getGlobal()->getSuperglobals()); } }
public function __construct($name, Environment $parent) { parent::__construct($name, $parent); $this->instanceEnvironment = new ClassInstanceEnvironment($name, $this); }
/** * @param string $name The name of the class. * @param ClassEnvironment $classEnvironment The class environment for instances of this class. */ public function __construct($name, $classEnvironment) { parent::__construct($name, $classEnvironment); $this->classEnvironment = $classEnvironment; }