src/Eloquent/Typhoon/ClassMapper/ClassMapper.php
public function classBySource(ClassName $className, $source)
    {
        $this->typeCheck->classBySource(func_get_args());

        foreach ($this->classesBySource($source) as $classDefinition) {
            if ($classDefinition->className()->string() === $className->toAbsolute()->string()) {
                return $classDefinition;
            }
        }

        throw new Exception\UndefinedClassException($className);
    }
public function classBySource(ClassName $className, $source)
    {
        $this->typeCheck->classBySource(func_get_args());

        foreach ($this->classesBySource($source) as $classDefinition) {
            if ($classDefinition->className()->string() === $className->toAbsolute()->string()) {
                return $classDefinition;
            }
        }

        throw new Exception\UndefinedClassException($className);
    }
public function classBySource ( ClassName $ className , $ source ) { $ this -> typeCheck -> classBySource ( func_get_args ( ) ) ; foreach ( $ this -> classesBySource ( $ source ) as $ classDefinition ) { if ( $ classDefinition -> className ( ) -> string ( ) === $ className -> toAbsolute ( ) -> string ( ) ) { return $ classDefinition ; } } throw new Exception \ UndefinedClassException ( $ className ) ; }
@param ClassName $className
@param string    $source

@return ClassDefinition
@throws Exception\UndefinedClassException
@param ClassName $className @param string $source