Get a shared definition structure.

@param string $id ID/name of the model to retrieve

@return Parameter
@throws \InvalidArgumentException if the model is not found
500603
public function getModel($id)
    {
        if (!$this->hasModel($id)) {
            throw new \InvalidArgumentException("No model found named $id");
        }

        // Lazily create models as they are retrieved
        if (!($this->models[$id] instanceof Parameter)) {
            $this->models[$id] = new Parameter(
                $this->models[$id],
                ['description' => $this]
            );
        }

        return $this->models[$id];
    }
533513
public function getPropertyDefinition($id)
    {
        return (isset($this->propertyDefinitions[$id]) ? $this->propertyDefinitions[$id] : null);
    }
397152
public function getRow($id = null)
    {
        if ($this->isDetached) {
            if ($id !== null) {
                throw new InvalidArgumentException('Argument $id in Result::getRow method cannot be passed when Result is in detached state.');
            }
            $id = self::DETACHED_ROW_ID;
        } elseif ($id === null) {
            throw new InvalidArgumentException('Argument $id in Result::getRow method must be passed when Result is in attached state.');
        }
        if (!isset($this->data[$id])) {
            return null;
        }
        return new Row($this, $id);
    }
17824
public function getItemById($id)
    {
        if (!isset($this->children[$id])) {
            throw new \InvalidArgumentException(sprintf("item with id %d does not exist", $id));
        }

        return $this->children[$id];
    }
1015622
public function path($id = null)
	{
		if (! isset($this->resource_path)) {
			throw new \InvalidArgumentException(static::class . ' does not implement a resource path definition.');
		}

		return is_null($id) ? $this->url($this->resource_path) : $this->url("$this->resource_path/$id");
	}
847391
public function getAlias($id)
    {
        $id = $this->normalizeId($id);

        if (!isset($this->aliasDefinitions[$id])) {
            throw new InvalidArgumentException(sprintf('The service alias "%s" does not exist.', $id));
        }

        return $this->aliasDefinitions[$id];
    }
1357871
public function initDefinition($id) {
		$reflection = $this->getReflectionById($id);
		$args       = $this->getArguments();
		
		$definition = new Definition\ClassDefinition($reflection, $args);
		
		if ($this->isFactory()) {
			$definition->setFactoryMode();
		}
		
		return $definition;
	}
736568
public function get($id)
    {
        foreach ($this->containers as $container) {
            if ($container->has($id)) {
                return $container->get($id);
            }
        }

        throw new UnknownDefinitionException($id);
    }
312589
protected function getPayload($id)
    {
        $rawPayload = $this->getRedis()->hget($this->getRedisJobNamespace(), $id);

        return static::parsePayload($rawPayload);
    }
1081690
public function getDefinition($id) {
		if (isset($this->_definitions[$id])) {
			return $this->_definitions[$id];
		}
		
		$locator = $this->getLocatorByServiceId($id);
		
		if ($locator !== null) {
			if ($locator instanceof DefinitionAwareInterface) {
				$definition = $locator->getDefinition($id);
				
				$this->_definitions[$id] = $definition;
				return $definition;
			}
			
			throw new Exceptions\ServiceNotFound('Unable to provide definition for the service "' . $id . '"');
		}
		
		throw new Exceptions\ServiceNotFound('Unable to found the service "' . $id . '"');
	}
508808
public function getGateway($id): GatewayInterface
    {
        $gateway = $this->_gateways[$id] ?? null;

        if ($gateway === null) {
            throw new InvalidArgumentException("Gateway: `$id` not exist!");
        } elseif (!$gateway instanceof GatewayInterface) {

            if (is_string($gateway)) {
                $gateway = ['class' => $gateway];
            }

            if (is_array($gateway)) {
                $gateway = ArrayHelper::merge($this->gatewayConfig, $gateway);
            }

            $gateway = $this->_gateways[$id] = Yii::createObject($gateway);
        }

        return $gateway;
    }
379575
public function getNew(string $id)
    {
        $definition = $this->raw($id);

        if (is_callable($definition)) {
            $service = call_user_func($definition, $this);
        } else {
            $service = $definition;
        }

        if (isset($this->extensionQueues[$id])) {
            $service = $this->extensionQueues[$id]->getService($service);
        }

        return $service;
    }
113915
public function findById($id)
    {
        $id = $this->getRepository()->idToMongo($id);
        return $this->mergeCriteria(array('_id' => $id));
    }
772210
public function getById($id)
    {
        $model = $this
            ->prepareQuery()
            ->where($this->model->getTable() . '.id', $id)
            ->first();

        if (empty($model))
            return null;

        $model = $this->addPermissionsForModel($model);

        return $this->formatModel($model);
    }
672395
public function get($id)
	{
	    if (isset($this->_definitions[$id]) && is_object($this->_definitions[$id]) && !is_callable($this->_definitions[$id])) {
	        $this->_components[$id] = $this->_definitions[$id];
	    } elseif (!isset($this->_components[$id])) {
	        if (!isset($this->_definitions[$id])) {
	            throw new \RuntimeException('Must set components before use: ' . $id);
	        }
	        
	        $this->_components[$id] = Ioc::createObject($this->_definitions[$id]);
	    }
	    
	    return $this->_components[$id];
	}
1264713
public function get($id)
    {
        if (isset($this->keys[$id])) {
            $this->requested[$id] = true;
            if (isset($this->callables[$id])) {
                $this->values[$id] = $this->callables[$id]();
                unset($this->callables[$id]);
            }
            return $this->values[$id];
        }
        throw new ContainerNotFoundException('Container identifier[' . $id . '] not found.');
    }
1333159
public function getRecipeById($id)
    {
        $result = [
            'className' => (isset($this->classNameById[$id])) ?
                $this->classNameById[$id] :
                null,
            'arguments' => (isset($this->argumentsById[$id])) ?
                $this->argumentsById[$id] :
                null,
            'constructor' => (isset($this->constructorById[$id])) ?
                $this->constructorById[$id] :
                null,
            'dependencies' => (isset($this->dependenciesById[$id])) ?
                $this->dependenciesById[$id] :
                null,
        ];

        return $result;
    }