Returns whether an item with given name is defined.

@param string $id The name of the item

@return bool

@throws InvalidArgumentException if the item name is invalid.
16968
public function has($id)
    {
        $id = (string) $id;

        $this->validateName($id);

        return isset($this->items[$id]);
    }
1331998
public function has( $id ){
		if( $this->cache->has( $this->cacheKey.$id ) )
			return TRUE;
		return (bool) $this->get( $id );
	}
1058385
public function getNode($id)
    {
        if (!isset($this->nodes[$id])) {
            throw new InvalidArgumentException(sprintf('There is no node with id "%s".', $id));
        }

        return $this->nodes[$id];
    }
590268
public function get($id)
    {
        foreach ($this->items as $item) {
            if ($item->id === $id) {
                return $item;
            }
        }
        return null;
    }
99464
public function offsetGet($id)
    {
        if (!array_key_exists($id, $this->container)) {
            throw new InvalidArgumentException(sprintf('Identifier "%s" is not defined.', $id));
        }

        return $this->container[$id] instanceof Closure ? $this->container[$id]($this) : $this->container[$id];
    }
995782
public function isDeleted($id)
    {
        if ($this->_deleted === null) {
            return false;
        }

        if (extension_loaded('bitset')) {
            return bitset_in($this->_deleted, $id);
        } else {
            return isset($this->_deleted[$id]);
        }
    }
786775
protected function getPackageInformation($id)
    {
        $package = $this->getContainer()->get('package.repository')->find($id);
        if (!$package instanceof PackageInterface) {
            throw new \InvalidArgumentException(sprintf('Package "%s" not found', $id));
        }

        return $package->getFullName();
    }
764995
public function isDefined($id)
    {
        return $this->internalContainer->offsetExists($id) ||
            $this->externalContainer && $this->externalContainer->has($id);
    }
184803
public function validateId($id)
    {
        if (null === $id) {
            throw new \InvalidArgumentException('Category id missing');
        } elseif (!is_numeric($id) || (int)$id != $id) {
            throw new \InvalidArgumentException('Invalid data type for category id');
        }
    }
1095447
public function offsetExists($id)
    {
        return isset($this->values[$id]) || isset($this->definitions[$id]) || isset($this->aliases[$id]);
    }
1256191
public function hasDirectory(string $id): bool
    {
        if (isset($this->directories[$id])) {
            return true;
        }

        $path = $this->getDirectoryPath($id);

        if ($this->filesystem->has($path)) {
            $info = $this->filesystem->getMetadata($path);

            return $info['type'] === 'dir';
        }

        return false;
    }
1188116
public static function getDisplayName($id)
    {
        $instance = self::_instance();

        if (!isset($instance->_items[$id])) {
            return false;
        }
        return $instance->_items[$id]['displayName'];
    }
90942
public function id($id = null)
    {
        if ($id) {
            if (!$this->isValidId($id)) {
                throw new \InvalidArgumentException('$id may contain only [a-zA-Z0-9-_]');
            }
            if ($this->id) {
                throw new Exception('Cannot set id while session is active');
            }
            $this->requestedId = $id;
        }
        return $this->id;
    }
635054
public function get($id)
    {
        if (!$this->has($id)) {
            throw new \InvalidArgumentException(sprintf('Configuration "%s" not found.', $id));
        }

        return $this->configurations[$id];
    }
156422
public function has($id)
    {
        if (is_string($id)) {
            return $this->getResolver()->hasService(
                $this->idWithoutScope($id)
            );
        }
        return false;
    }
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");
	}
1216557
public function getItemByID($id)
    {
        $item = current(array_filter($this->items, function (Item $item) use ($id) {
            return ($item->id === $id);
        }));

        return ($item) ? $item : null;
    }