src/ADT/List/LevelMap.php
public function has( $key )
	{
		if( empty( $key ) )																		//  no Key given
			throw new InvalidArgumentException( 'Key must not be empty.' );						//  throw Exception
		if( isset( $this->pairs[$key] ) )														//  Key is set on its own
			return TRUE;
		else																					//  Key has not been found
		{
			$key		.= $this->divider;														//  prepare Prefix Key to seach for
			foreach( $this->pairs as $pairKey => $pairValue )									//  iterate all stores Pairs
			{
				if( $pairKey[0] !== $key[0] )													//  precheck for Performance
					continue;																	//  skip Pair
				if( strpos( $pairKey, $key ) === 0 )											//  Prefix Key is found
					return TRUE;
			}
		}
		return FALSE;
	}
public function has( $key )
	{
		if( empty( $key ) )																		//  no Key given
			throw new InvalidArgumentException( 'Key must not be empty.' );						//  throw Exception
		if( isset( $this->pairs[$key] ) )														//  Key is set on its own
			return TRUE;
		else																					//  Key has not been found
		{
			$key		.= $this->divider;														//  prepare Prefix Key to seach for
			foreach( $this->pairs as $pairKey => $pairValue )									//  iterate all stores Pairs
			{
				if( $pairKey[0] !== $key[0] )													//  precheck for Performance
					continue;																	//  skip Pair
				if( strpos( $pairKey, $key ) === 0 )											//  Prefix Key is found
					return TRUE;
			}
		}
		return FALSE;
	}
public function has ( $ key ) { if ( empty ( $ key ) ) //  no Key given throw new InvalidArgumentException ( 'Key must not be empty.' ) ; //  throw Exception if ( isset ( $ this -> pairs [ $ key ] ) ) //  Key is set on its own return TRUE ; else //  Key has not been found { $ key .= $ this -> divider ; //  prepare Prefix Key to seach for foreach ( $ this -> pairs as $ pairKey => $ pairValue ) //  iterate all stores Pairs { if ( $ pairKey [ 0 ] !== $ key [ 0 ] ) //  precheck for Performance continue ; //  skip Pair if ( strpos ( $ pairKey , $ key ) === 0 ) //  Prefix Key is found return TRUE ; } } return FALSE ; }
Indicates whether a Key or Key Prefix is existing.
@access		public
@param		string		$key		Key in Dictionary
@return		bool
Indicates whether a Key or Key Prefix is existing .