Is name already exists

@param   string      $name
@param   int|null    $excludeId
@return  bool
171072
public function isNameExists( $name, $excludeId = null )
    {
        $platform = $this->getDbAdapter()
                         ->getPlatform();

        $nameEq = new Sql\Predicate\Expression(
            'LOWER(' . $platform->quoteIdentifier( 'name' ) . ') = ?',
            mb_strtolower( $name, 'UTF-8' )
        );

        return $this->isExists( empty( $excludeId ) ? array(
            $nameEq,
        ) : array(
            $nameEq,
            new Sql\Predicate\Operator(
                'id',
                Sql\Predicate\Operator::OP_NE,
                $excludeId
            ),
        ) );
    }
1036632
public static function optionExists($name, Exception $cause = null)
    {
        return new static(sprintf(
            'An option named "%s%s" exists already.',
            strlen($name) > 1 ? '--' : '-',
            $name
        ), self::OPTION_EXISTS, $cause);
    }
623394
public static function nameExists($name, Exception $cause = null)
    {
        return new static(sprintf(
            'A command named "%s" exists already.',
            $name
        ), self::NAME_EXISTS, $cause);
    }
329709
public function getIs( $name )
	{
		if( ! is_array($name) )
		{
			if( func_num_args() == 1 )
			{
				return $this->offsetExists($name);
			}
			else
			{
				$name = func_get_args();
			}
		}

		foreach($name as $value)
		{
			if (! $this->offsetExists($value))
			{
				return false;
			}
		}

		return true;
	}
1213873
public function isSubdomainUriExists( $subdomainId, $uri, $excludeUriId = null )
    {
        return $this->isExists( empty( $excludeUriId ) ? array(
            'subdomainId'   => $subdomainId,
            'uri'           => $uri,
        ) : array(
            'subdomainId'   => $subdomainId,
            'uri'           => $uri,
            new Predicate\Operator(
                'id',
                Predicate\Operator::OP_NE,
                $excludeUriId
            ),
        ) );
    }
223090
protected function serviceNameExists($name)
    {
        if($this->files->exists($this->getServiceDirectory() . $this->getDirOption() . $name . '.php')) {
            return true;
        }

        return false;
    }
893996
public function exists($name)
    {
        $viewblocks = $this->get('viewblocks', []);

        return !empty($viewblocks[$name]) || $this->Blocks->exists($name);
    }
558497
public function exists($name)
    {
        if ($name instanceof Template) {
            return true;
        }

        $loader = $this->environment->getLoader();

        if ($loader instanceof ExistsLoaderInterface || method_exists($loader, 'exists')) {
            return $loader->exists((string) $name);
        }

        try {
            // cast possible TemplateReferenceInterface to string because the
            // EngineInterface supports them but LoaderInterface does not
            $loader->getSourceContext((string) $name)->getCode();
        } catch (LoaderError $e) {
            return false;
        }

        return true;
    }
977907
public function contains($name){
		foreach($this->segments as $segment){
			if($segment->getName() == $name) return true;
		}
		return false;
	}
332564
public function widgetExist($name)
    {
        $name = strtolower($name);

        return isset($this->dataStore[0][$name]) ? $this->dataStore[0][$name] : false;
    }
379621
public static function isExistByNameType( $parentId, $parentType, $name, $type, $config = [] ) {

		$meta = self::queryByNameType( $parentId, $parentType, $name, $type, $config )->one();

		return isset( $meta );
	}
72194
public static function isSent($name) {
	
		// remove [] from array
		if (substr($name, -2) == '[]') {
			$name = substr($name, 0, -2);
		}
		
		// seeking a possible name
		return (array_key_exists($name, $_REQUEST));
			
	}
818713
public function routeExists(string $name): bool
    {
        return null !== $this->router->getRouteCollection()->get($name);
    }
97049
protected function isEntityNameValid($name)
    {
        if (is_string($name) === false) {
            return false;
        }

        $match = preg_match(self::PATTERN_VALIDATE_NAME, $name);
        if ($name === '' || $match === false || $match <= 0 || ReservedKeywords::isReservedKeyword($name) !== false) {
            return false;
        } else {
            return true;
        }
    }
1220776
public function __isset($name) {
		// Property exists
		if (isset($this->_data[$name])) {
			return true;
		}
		
		// Init method exists
		if (method_exists($this, lcfirst($name) . self::INIT_POSTFIX)) {
			return true;
		}
		
		// Init source exists
		if (! empty($this->_sources[$name])) {
			return true;
		}
		
		return false;
	}
751282
protected function isIncluded($_name)
    {
        for ($i = 0, $_i = count($this->includes); $i < $_i; $i++) {
            if ($this->matchPath($this->includes[$i], $_name, $this->isCaseSensitive)) {
                return true;
            }
        }

        return false;
    }
593855
public function exists($name)
    {
        if ($this->existsOnSpace(null, $name)) {
            return true;
        }

        foreach ($this->spacePaths as $space => $path) {
            if ($this->existsOnSpace($space, $name)) {
                return true;
            }
        }

        return false;
    }