Get entry of the container by its identifier.

@param string $id Identifier of the service.
@return mixed Entry of the container.
@throws NotFoundException If service not exist in container.
321920
public function get($id)
    {
        if (isset($this->aliases[$id])) {
            $id = $this->aliases[$id];
        }

        if (!isset($this->keys[$id])) {
            throw new NotFoundException(sprintf(
                'The service "%s" is not found',
                $id
            ));
        }

        if (isset($this->values[$id])) {
            return $this->values[$id];
        }

        if (! $this->keys[$id]) {
            if (isset($this->factories[$id])) {
                return $this->createFromFactory($this->factories[$id]);
            } else {
                return $this->createFromDefinition($this->definition[$id]);
            }
        }

        if (isset($this->factories[$id])) {
            $service = $this->createFromFactory($this->factories[$id]);
            unset($this->factories[$id]);
        } else {
            $service = $this->createFromDefinition($this->definition[$id]);
            unset($this->definition[$id]);
        }

        $this->values[$id] = $service;
        $this->immutable[$id] = true;
        return $service;
    }
941854
public function get($id)
    {
        if (isset($this->cache[$id])) {
            return $this->cache[$id];
        }

        throw new NotFoundException('No entry was found for this identifier.');
    }
372591
public function getID($ID)
    {
        if($this->hasID($ID)) {
            return $this->offsetGet($this->safeOffset($ID));
        } else {
            throw new CollectionIDNotFoundException('ID "' . $ID . '" does not exist in collection');
        }
    }
651326
public function show($id)
    {
        $modelName = $this->modelFullName;
        $model = $modelName::find($id);
        if(!$model) throw new NotFoundException('There is no Resource with id = ' . $id . ' !');
        return $model;
    }
923245
public function get($id)
    {
        /* @var $container InteropContainerInterface */
        foreach ($this->getContainers() as $container) {
            if ($container->has($id)) {
                return $container->get($id);
            }
        }

        // not found
        throw new NotFoundException(
            Message::get(Message::SERVICE_ID_NOT_FOUND, $id),
            Message::SERVICE_ID_NOT_FOUND
        );
    }
1054282
public function get($id)
    {
        if ($id instanceof \Closure) {
            return $id($this);
        }

        if (!$this->has($id)) {
            $service = $this->factory->create($id, $this);
            $this->repository->set($id, $service);
        }

        return $this->repository->get($id);
    }
1102570
public function get($id): Domain
    {
        if (!$model = Domain::findOne($id)) {
            throw new NotFoundException($this->i18n->t('setrun/sys/domain', 'Domain is not found'));
        }
        return $model;
    }
389365
protected function getPost($id)
    {
        $post = $this->postManager->find($id);

        if (null === $post) {
            throw new NotFoundHttpException(sprintf('Post (%d) not found', $id));
        }

        return $post;
    }
54724
public function get($id) {
		foreach($this->values as $container) {
			if($container->has($id)) {
				return $container->get($id);
			}
		}
		throw new NotFoundException("'$id' value not found");
	}
455047
public function get($id)
    {
        $entry = $this->readFile($id);
        if ($entry != false && $this->isTtlMode()) {
            $entry = (is_null($entry[static::ENTRY_EXPIRATION]) || $entry[static::ENTRY_EXPIRATION] > $this->getTime())
                ? $entry[static::ENTRY_VALUE]
                : false
            ;
        }
        return $entry;
    }
70616
public function loadContentfulEntry(string $id): ContentfulEntry
    {
        $idList = explode('|', $id);
        if (count($idList) !== 2) {
            throw new NotFoundException(
                sprintf(
                    'Item ID %s not valid.',
                    $id
                )
            );
        }

        $client = $this->getClientBySpaceId($idList[0]);

        if ($client === null) {
            throw new NotFoundException(
                sprintf(
                    'Item ID %s not valid.',
                    $idList[0]
                )
            );
        }

        $contentfulEntry = $this->findContentfulEntry($id);

        if ($contentfulEntry instanceof ContentfulEntry) {
            $contentfulEntry->reviveRemoteEntry($client);
        } else {
            $contentfulEntry = $this->buildContentfulEntry(
                $client->getEntry($idList[1]),
                $id
            );
        }

        if ($contentfulEntry->getIsDeleted()) {
            throw new NotFoundException(
                sprintf(
                    'Entry with ID %s deleted.',
                    $id
                )
            );
        }

        return $contentfulEntry;
    }
462136
protected function getUser($id)
    {
        $user = $this->userManager->findUserBy(['id' => $id]);

        if (null === $user) {
            throw new NotFoundHttpException(sprintf('User (%d) not found', $id));
        }

        return $user;
    }
1083629
public function get($id, $args = null) {
		if (isset($args[2])) {
			$args = func_get_args();
			array_shift($args);
		}
		
		if (isset($this->_definitions[$id])) {
			return $this->_definitions[$id]->getService($args);
		}
		
		$locator = $this->getLocatorByServiceId($id);
		
		if ($locator !== null) {
			return $locator->get($id, $args);
		}
			
		throw new Exceptions\ServiceNotFound('Unable to found the service "' . $id . '"');
	}
1146896
public function getSubService($id, $interface = null)
    {
        if (! isset($this->subServices[$id])) {
            if ($this->hasOption($id)) {
                $service = $this->buildService($this->getOption($id), $interface);
                if ($service) {
                    $this->subServices[$id] = $service;
                } else {
                    throw new ServiceNotFoundException($id);
                }
            } else {
                throw new ServiceNotFoundException($id);
            }
        }
        return $this->subServices[$id];
    }
551489
public function find($id) {
    try {
      $user = $this->sentry->findGroupById($id);
    } catch (GroupNotFoundException $e) {
      throw new NotFoundException;
    }

    return $user;
  }
537776
public function getServiceNameById($id)
    {
        $map = $this->getServiceIdNameMap();
        if (array_key_exists($id, $map)) {
            return $map[$id];
        }

        return null;
    }
1341831
private function getDefinition($id)
    {
        $id = $this->getDefinitionId($id);

        return null === $id ? null : $this->container->getDefinition($id);
    }