src/ADT/Constant.php
public static function getAll( $prefix = NULL, $excludePrefix = NULL )
	{
		$prefix	= strtoupper( $prefix );
		$length	= strlen( $prefix );
		if( $length	< 2 )
			throw new InvalidArgumentException( 'Prefix "'.$prefix.'" is to short.' );
		$map	= get_defined_constants();
		if( $prefix ){
			foreach( $map as $key => $value )
			{
				if( $key[0] !== $prefix[0] )
					unset( $map[$key] );
				else if( $key[1] !== $prefix[1] )
					unset( $map[$key] );
				else if( substr( $key, 0, $length ) !== $prefix )
					unset( $map[$key] );
#				remark( $prefix." - ".$key." - ".(int)isset( $map[$key] ) );
			}
		}
		if( $excludePrefix ){
			if( substr( $excludePrefix, 0, $length ) !== $prefix )
				$excludePrefix	= $prefix.$excludePrefix;
			foreach( $map as $key => $value ){
				if( substr( $key, 0, strlen( $excludePrefix ) ) === $excludePrefix )
					unset( $map[$key] );
			}
		}
		return $map;
	}
public static function getAll( $prefix = NULL, $excludePrefix = NULL )
	{
		$prefix	= strtoupper( $prefix );
		$length	= strlen( $prefix );
		if( $length	< 2 )
			throw new InvalidArgumentException( 'Prefix "'.$prefix.'" is to short.' );
		$map	= get_defined_constants();
		if( $prefix ){
			foreach( $map as $key => $value )
			{
				if( $key[0] !== $prefix[0] )
					unset( $map[$key] );
				else if( $key[1] !== $prefix[1] )
					unset( $map[$key] );
				else if( substr( $key, 0, $length ) !== $prefix )
					unset( $map[$key] );
#				remark( $prefix." - ".$key." - ".(int)isset( $map[$key] ) );
			}
		}
		if( $excludePrefix ){
			if( substr( $excludePrefix, 0, $length ) !== $prefix )
				$excludePrefix	= $prefix.$excludePrefix;
			foreach( $map as $key => $value ){
				if( substr( $key, 0, strlen( $excludePrefix ) ) === $excludePrefix )
					unset( $map[$key] );
			}
		}
		return $map;
	}
public static function getAll ( $ prefix = NULL , $ excludePrefix = NULL ) { $ prefix = strtoupper ( $ prefix ) ; $ length = strlen ( $ prefix ) ; if ( $ length < 2 ) throw new InvalidArgumentException ( 'Prefix "' . $ prefix . '" is to short.' ) ; $ map = get_defined_constants ( ) ; if ( $ prefix ) { foreach ( $ map as $ key => $ value ) { if ( $ key [ 0 ] !== $ prefix [ 0 ] ) unset ( $ map [ $ key ] ) ; else if ( $ key [ 1 ] !== $ prefix [ 1 ] ) unset ( $ map [ $ key ] ) ; else if ( substr ( $ key , 0 , $ length ) !== $ prefix ) unset ( $ map [ $ key ] ) ; #				remark( $prefix." - ".$key." - ".(int)isset( $map[$key] ) ); } } if ( $ excludePrefix ) { if ( substr ( $ excludePrefix , 0 , $ length ) !== $ prefix ) $ excludePrefix = $ prefix . $ excludePrefix ; foreach ( $ map as $ key => $ value ) { if ( substr ( $ key , 0 , strlen ( $ excludePrefix ) ) === $ excludePrefix ) unset ( $ map [ $ key ] ) ; } } return $ map ; }
Returns a Map of defined Constants.
@access		public
@static
@return		array
Returns a Map of defined Constants .