public function setScope($scope)
    {
        $this->setState(self::STATE_SCOPE, $scope);
        
        if (!$scope) {
            $this->variables = [];
        }
        
        $this->markModified();
    }