Returns true if the given service is defined.

@param string $id The service identifier

@return bool true if the service is defined, false otherwise
169061
public function has($id)
    {
        $id = $this->normalizeId($id);

        return isset($this->definitions[$id]) || isset($this->aliasDefinitions[$id]) || parent::has($id);
    }
399789
public function isModified($id)
    {
        return isset($this->modified[$id]) and !empty($this->modified[$id]);
    }
379849
public function has($id)
    {
        if (isset($this->aliases[$id])) {
            $id = $this->aliases[$id];
        }
        if (isset($this->services[$id])) {
            return true;
        }
        if ('service_container' === $id) {
            return true;
        }

        return isset($this->fileMap[$id]) || isset($this->methodMap[$id]);
    }
83976
public function has($id)
    {
        if (array_key_exists($id, $this->entityClassNameCache)) {
            return false !== $this->entityClassNameCache[$id];
        }

        $objectManagerAutoDetector = $this->getObjectManagerAutoDetector();
        if (!$objectManagerAutoDetector->hasObjectManagerNameByClassName($id)) {
            $this->entityClassNameCache[$id] = false;
            return false;
        }
        $objectManagerName = $objectManagerAutoDetector->getObjectManagerNameByClassName($id);

        $doctrineOrmModuleConfig = $this->getDoctrineOrmModuleConfig();
        if (!$doctrineOrmModuleConfig->hasNamespacesByObjectManager($objectManagerName)) {
            $this->entityClassNameCache[$id] = false;
            return false;
        }

        $namespacesIndex = $doctrineOrmModuleConfig->getNamespacesIndexByObjectManagerName($objectManagerName);

        if (false === $this->hasEntityPostfixByInterfaceName($id)) {
            $this->entityClassNameCache[$id] = false;
            return false;
        }
        $entityPostfix = $this->getEntityPostfixByInterfaceName($id);

        $entityClassName = $this->resolveEntityClassName($entityPostfix, $namespacesIndex, $id);

        $this->entityClassNameCache[$id] = $entityClassName;

        return false !== $this->entityClassNameCache[$id];
    }
1281380
private function checkSessionId(string $id) : bool
    {
        if (preg_match('/^[A-Za-z0-9]+$/', $id) !== 1) {
            return false;
        }

        if (strlen($id) !== $this->idLength) {
            return false;
        }

        return true;
    }
1356521
public function __isset($id) {
		if ($this->has($id)) {
			return true;
		}
		
		if ($this->hasLocator()) {
			$locator = $this->getLocator();
			
			if ($locator->has($id)) {
				return true;
			}
		}
		
		return false;
	}
261012
public function hasInstance($id) {
        $id = $this->normalizeID($id);

        return isset($this->instances[$id]);
    }
1036396
public function initialized($id)
    {
        $id = $this->normalizeId($id);

        if (isset($this->privates[$id])) {
            @trigger_error(sprintf('Checking for the initialization of the "%s" private service is deprecated since Symfony 3.4 and won\'t be supported anymore in Symfony 4.0.', $id), E_USER_DEPRECATED);
        }

        if (isset($this->aliases[$id])) {
            $id = $this->aliases[$id];
        }

        if ('service_container' === $id) {
            return false;
        }

        return isset($this->services[$id]);
    }
1233860
public function getDefinition($id)
    {
        $id = (string) $id;

        if (!isset($this->definitions[$id])) {
            throw new ServiceNotFoundException($id);
        }

        return $this->definitions[$id];
    }
764995
public function isDefined($id)
    {
        return $this->internalContainer->offsetExists($id) ||
            $this->externalContainer && $this->externalContainer->has($id);
    }
531409
public static function run($id): bool
    {
        $id = abs((int)$id);
        /** @var ServiceEntity $service_entity */
        $service_entity = ServiceEntityRepository::findOneEntityById($id);

        if (!$service_entity || $service_entity->getRunning()) {
            return false;
        }

        $file = Finder::getInstance()->searchForRealPath($service_entity->getFile() . '.php', Finder::TYPE_SERVICES);

        if (!$file || !\file_exists(DIR_BASE . $file)) {
            return false;
        }

        $service_entity->setRunning(1);
        $service_entity->save();

        // No bckground processes
        if (!function_exists('pcntl_fork')) {
            // Run service file
            require DIR_BASE . $file;
            // Set service is done
            self::setDone($id);

            return true;
        }

        // Run as background process
        $pid = pcntl_fork();
        SQL::getInstance()->connect();

        if ($pid == -1) {
            echo $pid . ": Could not start background service for " . $file . "\n";
            // Could not fork
        } else if ($pid) {
            // We are the parent, doing nothing
        } else {
            echo "Running ". $file . "\n";
            // Run service file
            require DIR_BASE . $file;
            // Set service is done
            self::setDone($id);
            exit("Finished ". $file . "\n");
        }

        return true;
    }
307087
public function getServiceById($id)
    {
        if ($name = $this->getServiceNameById($id)) {
            return $this->getService($name);
        }

        return null;
    }
791910
public function hasInitialized($id, $args = null) {
		if (isset($args[2])) {
			$args = func_get_args();
			array_shift($args);
		}
		
		return $this->getDefinition($id)->hasInitialized($args);
	}
206649
protected function serviceTranslation(/*# string */ $id)/*# : bool */
    {
        // no translation allowed
        if (!$this->trans) {
            return false;
        }

        // translate to 'storage.di' & 'storage.di.storage'
        $newSec = $id . '.' . $this->base_node;
        $newId  = $newSec . '.' . $id;

        // check 'storage.di.storage' in config
        if ($this->config_resolver->has($newId) &&
            method_exists($this->config_resolver, 'enableDeReference')
        ) {
            $data = $this->getRawConfig($newSec);
            foreach ($data as $xId => $xDef) {
                $this->set($this->getSectionId($xId), $xDef);
            }
            return true;
        }

        return false;
    }
947207
public function hasService($serviceId) {

	    return !empty($this->config->services) && array_key_exists($serviceId, $this->config->services);

    }
156422
public function has($id)
    {
        if (is_string($id)) {
            return $this->getResolver()->hasService(
                $this->idWithoutScope($id)
            );
        }
        return false;
    }
560182
public function has( $id )
	{
		return \DB::select( $this->table )
			->where( 'id', $id )
			->column( 'id', $this->database ) == $id;
	}