Get service from container

@param string $id Srvice id
@throws ServiceNotFoundException;
@return mixed Service or null if not exist
761353
public function get($id)
    {
        if ($this->has($id) == false) {
            throw new ServiceNotFoundException($id); 
        } 

        if (\is_object($this->services[$id]) == false || method_exists($this->services[$id], '__invoke') == false) {
            return $this->services[$id];
        }
        $this->services[$id] = $this->services[$id]($this); 
    
        return $this->services[$id];
    }
137962
public function getOrFail($id)
    {

        if ($model = $this->get($id)) {
            return $model;
        }

        $typeName = Type::of($this->prototype());

        throw new ResourceNotFoundException("$typeName #$id not found.");
    }
406089
public function getService($id) {
		if ($this->factoryMode) {
			return $this->initService($id);
		}
		
		$fullId = $id . ':' . $this->getIdByArgs([]);
		
		if (! isset($this->services[$fullId])) {
			$this->services[$fullId] = $this->initService($id);
		}
			
		return $this->services[$fullId];
	}
730107
public function offsetGet($id)
    {
        if (!isset($this[$id])) {
            $this['singular.service_locator']->locate($id);
        }

        return parent::offsetGet($id);
    }
141176
public function enableService($id)
	{
	    if(!isset($this->services[$id])){
	        throw new Exception\ServiceNotFoundException(
                sprintf('Service ID "%s" does not exist', $id)
	        );
	    }
	    
	    if (!isset($this->services[$id]['listener'])) {
	        $this->services[$id]['listener'] = $this->getCommandManager()->attach(
                $this->services[$id]['name'], $id, $this->services[$id]['priority']);
	        
	        return true;
	    } else {
	        return false;
	    }
	}
350498
public function get(string $id): FixtureInterface
    {
        if ($this->has($id)) {
            return clone $this->fixtures[$id];
        }

        throw FixtureNotFoundExceptionFactory::create($id);
    }
1291855
public function get($id)
    {
        $entity = $this->repository->find($id);

        if (!$entity) {
            throw new RestNotFoundException();
        }

        return $entity;
    }
254794
public function get($id)
    {
        try {
            $handler = $this->resolve($id);

            if ($handler instanceof RequestHandlerInterface) {
                return $handler;
            }

            return new CallableHandler($handler);
        } catch (NotFoundExceptionInterface $exception) {
            throw $exception;
        } catch (Exception $exception) {
            throw new class("Error getting the handler $id", 0, $exception) extends Exception implements
                ContainerExceptionInterface {
            };
        }
    }
936634
public function get($id, $args = null) {
		if (isset($this->checkedIds[$id]) && ! $this->checkedIds[$id]) {
			throw new Exceptions\ServiceNotFound('Unable to found the service "' . $id . '"');
		}
		
		$args = $this->resolveArgs(func_get_args());
		
		try {
			$service = ($args === null)
				? $this->getService($id)
				: $this->getServiceByArgs($id, $args);
		}
		catch (Exceptions\ServiceNotFound $exception) {
			$this->checkedIds[$id] = false;
			throw $exception;
		}
		
		$this->checkedIds[$id] = true;
		return $service;
	}
828353
public function get($id)
    {
        if (!array_key_exists($id,$this->services)) {
            throw new \InvalidArgumentException(sprintf(
                'Service with id "%s" is not registered.',
                $id
            ));
        }

        $value = $this->services[$id];
        if (method_exists($value, '__invoke')) {
            $value = $value($this);
        }

        if (method_exists($value,'setContainer')) {
            $value->setContainer($this);
        }

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

        return null === $id ? null : $this->container->getDefinition($id);
    }
670908
public function load($id, $options = null)
	{
	    $id = $this->normalizeServiceId($id);
	    
	    if(!isset($this->services[$id])){
	        throw new Exception\ServiceNotFoundException(
                sprintf('Service ID "%s" does not exist', $id)
	        );
	    }
	    
        if($options == null){
            $options = $this->services[$id]['options'];
        }
        
        return $this->getServicePluginManager()->get($id, $options, true, true);
	}
935608
public function get($container = null)
    {
        if ($container) {
            return $container->get($this->id);
        }
        return Ioc::container()->get($this->id);
    }
469541
public function get($id)
    {
        if (!is_string($id)) {
            throw new ContainerException('$id must be a string');
        }

        if (!isset($this->definitions[$id])) {
            throw new NotFoundException("Unresolvable ".$id);
        }

        return $this->definitions[$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];
    }
1276395
public function get($id)
    {
        if (!$this->has($id)) {
            return;
        }

        return $this->container->findDefinition($id)->getClass();
    }
731058
public function get($id)
    {
        foreach ($this->data as $host) {
            if ($host->getId() === $id) {
                return $host;
            }
        }

        throw new ResourceNotFoundException(sprintf('Service "%s" not found.', $id));
    }