Calls a scope method on the model.

@param  string $scope        Scope
@param  mixed  ...$arguments Arguments
@return $this
965157
public function scope(string $scope, ...$arguments)
	{
		$this->model->{Str::underscored2camel($scope) . 'Scope'}(...array_merge([$this], $arguments));

		return $this;
	}
278883
protected function removeScope( Node$scope ):self
	{
		if( $scope!==array_shift($this->scopes) ){
			$this->throw('Scope nesting error');
		};

		return $this;
	}
345539
public function setChildScope(Scope $childScope)
    {
        $this->childScope = $childScope;

        if ($childScope->getParentDirective() !== $this) {
            $childScope->setParentDirective($this);
        }

        return $this;
    }
160366
public function with($scope)
	{
		$scope = is_array($scope) ? $scope : [$scope];

		$this->scopes = array_merge($this->scopes, $scope);

		return $this;
	}
508769
public function setArguments($arguments)
    {
        foreach ($arguments as $name => $argument) {
            $this->setArgument($name, $argument);
        }

        return $this;
    }
320402
public function withoutGlobalScope($scope)
    {
        if (! is_string($scope)) {
            $scope = get_class($scope);
        }

        unset($this->scopes[$scope]);

        $this->removedScopes[] = $scope;

        return $this;
    }
623508
protected function addToScopes(TreeScope $scope)
    {
        $this->scopes[] = $scope;
        $this->scopeByName[$scope->getName()] = $scope;
        $this->scopeByModelRootId[$scope->getModelRootId()] = $scope;
        $this->scopeByPathPrefix[$scope->getPathPrefix()] = $scope;
    }
875876
public function addScope($scope)
    {
        if (!in_array($scope, $this->scopes)) {
            $this->scopes[] = $scope;
        }

        return $this;
    }
530594
public function newQueryWithoutScope($scope)
    {
        $this->getGlobalScope($scope)->remove($query = $this->getQuery(), $this);

        return $query;
    }
51028
public static function addGlobalScope($scope, Closure $implementation = null)
    {
        if (is_string($scope) && !is_null($implementation)) {
            return static::$globalScopes[static::class][$scope] = $implementation;
        }
        if ($scope instanceof Closure) {
            return static::$globalScopes[static::class][spl_object_hash($scope)] = $scope;
        }
        if ($scope instanceof Scope) {
            return static::$globalScopes[static::class][get_class($scope)] = $scope;
        }

        throw new InvalidArgumentException('Global scope must be an instance of Closure or Scope.');
    }
1135964
public function update(Queries\IScope $scope)
    {
        if ($this->scope === $scope) {
            return $this;
        }

        return new self($scope);
    }
922120
public function _call($instance, $method, $arguments = [])
    {
        if (method_exists($instance, $method)) {
            return call_user_func_array([$instance, $method], $arguments);
        }
    }
700131
public function bindCallback(string $scope, string $abstract, callable $factory)
    {
        $this->validateScope(__METHOD__, $scope);

        if ($scope === self::SCOPE_INSTANCE_PER_RESOLVE) {
            $this->container->bind($abstract, $factory);
        } else {
            $this->container->singleton($abstract, $factory);
        }
    }
933229
public function setScopes(array $scopes = null)
    {
        ValidationUtility::ensureNullOrArrayOfType(
            '$scopes', $scopes, __NAMESPACE__ . '\Scope');

        $this->scopes = $scopes;

        return $this;
    }
580155
public function setScope($scope)
    {
        $validScopes = ['col', 'row', 'colgroup', 'rowgroup'];

        if (!StringHelper::isOneOf($scope, $validScopes)) {
            throw new \Exception(sprintf('"%s" is not a valid <td> scope. Valid are: %s', $scope, implode(', ', $validScopes)));
        }

        $this->attributes->set('scope', $scope);

        return $this;
    }
639212
public function get(TreeScope $scope){

        $scopeId = $this->getScopeId($scope);

        if(!isset($this->models[$scopeId])){
            $this->models[$scopeId] = $this->makeModel($scope);
        }

        return $this->models[$scopeId];

    }
368588
public function push($scope)
    {
        if (! is_array($scope)) {
            $scope = func_get_args();
        }

        $this->scopes[] = $scope;

        return $this;
    }