src/ADT/PHP/Container.php
public function getInterfaceFromInterfaceName( $interfaceName, ADT_PHP_Interface $relatedArtefact )
	{
		if( !isset( $this->interfaceNameList[$interfaceName] ) )
			throw new Exception( 'Unknown interface "'.$interfaceName.'"' );
		$list		= $this->interfaceNameList[$interfaceName];
		$category	= $relatedArtefact->getCategory();
		$package	= $relatedArtefact->getPackage();

		if( isset( $list[$category][$package] ) )													//  found Interface in same Category same Package
			return $list[$category][$package];														//  return Data Object of Interface

		if( isset( $list[$category] ) )																//  found Interface in same Category but different Package
			return array_shift( $list[$category] );													//  this is a Guess: return Data Object of guessed Interface

		return array_shift( array_shift( $list ) );
	}
public function getInterfaceFromInterfaceName( $interfaceName, ADT_PHP_Interface $relatedArtefact )
	{
		if( !isset( $this->interfaceNameList[$interfaceName] ) )
			throw new Exception( 'Unknown interface "'.$interfaceName.'"' );
		$list		= $this->interfaceNameList[$interfaceName];
		$category	= $relatedArtefact->getCategory();
		$package	= $relatedArtefact->getPackage();

		if( isset( $list[$category][$package] ) )													//  found Interface in same Category same Package
			return $list[$category][$package];														//  return Data Object of Interface

		if( isset( $list[$category] ) )																//  found Interface in same Category but different Package
			return array_shift( $list[$category] );													//  this is a Guess: return Data Object of guessed Interface

		return array_shift( array_shift( $list ) );
	}
public function getInterfaceFromInterfaceName ( $ interfaceName , ADT_PHP_Interface $ relatedArtefact ) { if ( ! isset ( $ this -> interfaceNameList [ $ interfaceName ] ) ) throw new Exception ( 'Unknown interface "' . $ interfaceName . '"' ) ; $ list = $ this -> interfaceNameList [ $ interfaceName ] ; $ category = $ relatedArtefact -> getCategory ( ) ; $ package = $ relatedArtefact -> getPackage ( ) ; if ( isset ( $ list [ $ category ] [ $ package ] ) ) //  found Interface in same Category same Package return $ list [ $ category ] [ $ package ] ; //  return Data Object of Interface if ( isset ( $ list [ $ category ] ) ) //  found Interface in same Category but different Package return array_shift ( $ list [ $ category ] ) ; //  this is a Guess: return Data Object of guessed Interface return array_shift ( array_shift ( $ list ) ) ; }
Searches for an Interface by its Name in same Category and Package.
Otherwise is searches in different Packages and finally in different Categories.
@access		public
@param		string				$interfaceName		Name of Interface to find Data Object for
@param		ADT_PHP_Interface	$relatedArtefact	A related Class or Interface (for Package and Category Information)
@return		ADT_PHP_Interface
@throws		Exception			if Interface is not known
Searches for an Interface by its Name in same Category and Package . Otherwise is searches in different Packages and finally in different Categories .