Return the definition for the given resource name

@param string $name

@return \Innmind\Rest\Client\Definition\ResourceDefinition
345046
public function get($name)
    {
        if ($this->cache->has($name)) {
            return $this->loader->load($this->cache->get($name));
        }

        if (!$this->cache->isFresh()) {
            $this->refresh();

            return $this->get($name);
        }

        throw new \InvalidArgumentException(sprintf(
            'Unknown resource named "%s" for the host "%s"',
            $name,
            $this->host
        ));
    }
1141448
protected function getResourceOwner($name)
    {
        foreach ($this->ownerMaps as $ownerMap) {
            $resourceOwner = $ownerMap->getResourceOwnerByName($name);
            if ($resourceOwner instanceof ResourceOwnerInterface) {
                return $resourceOwner;
            }
        }

        throw new \RuntimeException(sprintf("No resource owner with name '%s'.", $name));
    }
939304
public function getDefinitionByName($name)
    {
        if (!array_key_exists($name, $this->definitions)) {
            throw new \InvalidArgumentException(sprintf('Can\'t find "%s" Definition.', $name));
        }

        return $this->definitions[$name];
    }
390731
protected function getResourceType($name)
    {
        if (!isset($this->types[$name])) {
            $template = $this->parser->parse($name);
            if ($template instanceof TemplateReferenceInterface) {
                $this->types[$name] = $template->get('engine');
            }
        }
        if (!isset($this->types[$name])) {
            throw new \RuntimeException("Could not load the given resource.");
        }

        return $this->types[$name];
    }
406215
protected function createResourceInstance($name)
    {
        $classname = '\\Habrahabr\\Api\\Resources\\' . $name;

        if (!class_exists($classname)) {
            throw new ResourceNotExistsException($name);
        }

        $resource = new $classname();
        $resource->setAdapter($this->adapter);

        return $resource;
    }
752096
public function get($name)
    {
        $name = ltrim($name, '\\');
        if (! isset($this->instances[$name])) {
            $this->instances[$name] = $this->newInstance($name);
        }
        return $this->instances[$name];
    }
912889
public function getConstantDefinition($name) {
		if (isset($this->constantsDef[$name])) {
			return $this->constantsDef[$name];
		} else {
			return null;
		}
	}
818937
public function get($name)
    {
        if(array_key_exists($name, $this->services))
            return $this->services[$name];

        return $this->services[$name] = $this->solve('service', $name, array($this));
    }
570264
public function &getResource ($name)
	{
		
		// If the resource is not set
		
		if (!isset ($this->resources[$name]))
		{
			
			// Return FALSE
			
			$bln = FALSE;
			return $bln;
			
		}
		
		// Return resource reference
		
		return $this->resources[$name];
		
	}
1292612
protected function getDefinitionFile($type, $name)
    {
        if (array_key_exists($name, $this->definitionFiles)) {
            return $this->definitionFiles[$name];
        }

        $this->definitionFiles[$name] = null;
        $this->definitionFiles[$name] = $this->findDefinitionFileByComposer($name);

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

        $this->definitionFiles[$name] = $this->findDefinitionFileByName($name);

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

        $this->definitionFiles[$name] = $this->findDefinitionFileByRegex($type, $name);

        return $this->definitionFiles[$name];
    }
459720
public static function tryGetResource(string $name)
    {
        $resource = static::getInstance($name)->tryGetResource();
        if(!$resource)
        {
            static::pushResourceToRequestContext($resource);
        }
        return $resource;
    }
1350606
public function getInjectedDefinitions($name)
    {
        $names = (array) $name;
        $visited = array();

        foreach ($names as $name) {
            $this->doGetInjectedDefinitions($name, $visited);
        }

        return $visited;
    }
1305539
public function getByName($name)
    {
        $group = new Group(
            $this->getContext(),
            new ResourcePathServiceOperation($this->getContext(), $this->getResourcePath(), "getbyname", array($name))
        );
        return $group;
    }
1326596
public function getReporterDefinition($name)
    {
        $definition = [];
        if (isset($this->reporters[$name])) {
            $definition = $this->reporters[$name];
        }
        return $definition;
    }
1061646
public function get($name)
    {
        if (! $this->has($name)) return null;

        $def = $this->components[$name];

        // already initialized.
        if (! $def instanceof ComponentDefine) {
            return $def;
        }

        // initialize.
        return $def->getInstance();
    }
766677
public function resource($resourceDefinition)
    {
        $parameter = new ResourceParameter($resourceDefinition);
        $parameter->setRoute($this->route);

        $this->parameters[$resourceDefinition] = $parameter;

        return $parameter;
    }
419354
public function getField(string $name): FieldInterface
    {
        if (!$this->hasField($name)) {
            throw new DefinitionException("Field '$name' is not defined.");
        }

        return $this->fields[$name];
    }