Return the resource with name.

@param string $name The name of the resource

@return AnDomainResource
483472
public function getResource($name)
    {
        foreach ($this->_resources as $resource) {
            if ($resource->getName() == $name) {
                return $resource;
            }
        }
    }
845968
public function get($name)
    {
        switch (true) {
            case isset($this->active[$name]):
                return $this->values[$name];

            case isset($this->values[$name]):
                break;

            case \array_key_exists($name, $this->values):
                break;

            case isset($this->alias[$name]):
                $this->active[$name] = true;

                return $this->values[$name] = $this->get($this->alias[$name]);

            case isset($this->factory[$name]):
                $factory = $this->factory[$name];

                if (\is_string($factory) && \class_exists($factory)) {
                    $this->values[$name] = $this->create($factory, $this->factoryMap[$name]);
                } else {
                    $this->values[$name] = $this->call($factory, $this->factoryMap[$name]);
                }
                break;

            case \class_exists($name):
                return $this->build($name);

            default:
                throw new NotFoundException($name);
        }

        $this->active[$name] = true;


        if (null !== $configures = $this->getConfigure($name)) {
            foreach ($configures as $index => $config) {
                $value = $this->call($config, $this->configMap[$name][$index]);

                if ($value !== null) {
                    $this->values[$name] = $value;
                }
            }
        }

        return $this->values[$name];
    }
533926
protected function getProvider($name) {
        $k = ObjectHelper::getShortName($name);
        $v = $this->getIndex()[$k];
        if (null === $v) {
            return null;
        }
        return $this->getProviders()[$v];
    }
1128003
public function get(string $name): string {
        if (!isset($this->get[$name])) {
            return "";
        }
        return $this->get[$name];
    }
175372
protected function getCollectionUpperName($name = null)
    {
        $name = str_plural($this->getResourceName($name));

        $pieces = explode('_', $name);
        $name = "";
        foreach ($pieces as $k => $str) {
            $name .= ucfirst($str);
        }

        return $name;
    }
1171050
public function getByName($name) {
		$param = $this->findByName($name);
		if (empty($param)) {
			$param = new Parameter();
			$param->setName($name);
			$this->parameters->add($param);
		}

		return $param;
	}
1071329
public function findByName($name)
    {
        foreach ($this->findAll() as $datasourceNode) {
            if ($datasourceNode->getName() === $name) {
                return $datasourceNode;
            }
        }
    }
675052
public function &__get($name)
    {
        list($result, $found) = $this->peridotScanChildren($this, function ($childScope, &$accumulator) use ($name) {
            if (property_exists($childScope, $name)) {
                $accumulator = [$childScope->$name, true, $childScope];
            }
        });
        if (!$found) {
            throw new DomainException("Scope property $name not found");
        }
        return $result;
    }
397511
public function get(string $name)
    {
        if (isset($this->workerClassMap[$name])) {
            return $this->container->get($this->workerClassMap[$name]);
        }
        return $this->container->get($name);
    }
817098
public function searchByName($name) {
		return $this->parameters->search($name, function (Parameter $param, $name) {
			return $param->getName() == $name;
		});
	}
1325409
public function get(string $name): Projection {
        return $this->projections->filter(function (Projection $projection) use ($name) {
            return $projection->name() === $name;
        })->first();
    }
752096
public function get($name)
    {
        $name = ltrim($name, '\\');
        if (! isset($this->instances[$name])) {
            $this->instances[$name] = $this->newInstance($name);
        }
        return $this->instances[$name];
    }
925932
public function getTemplate($name)
    {
        $template = $this->parameters->get('template', $this->getDefaultTemplate($name));

        if (null === $template) {
            throw new \RuntimeException(sprintf('Could not resolve template for resource "%s".', $this->metadata->getAlias()));
        }

        return $template;
    }
608585
public static function getInstance($name = 'default')
    {
        if (isset(static::$instances[$name])) {
            return static::$instances[$name];
        }

        $instance = new static();

        static::$instances[$name] = $instance;

        return $instance;
    }
169760
public function resource($name, $resource = null)
    {
        if ($resource) {
            $this->addResource($name, $resource);
        } else {
            return $this->getResource($name);
        }
    }
381199
public function get(string $name)
    {
        return isset(self::$services[$name]) ? self::$services[$name] : null;
    }
958939
public function findByName($name) {
		foreach ($this->parameters as $param) {
			if ($param->getName() == $name) {
				return $param;
			}
		}
	}