src/Utility/Digest/DigestFactory.php
public static function getDigest($digestName)
    {
        $enzymes = self::getEnzymes();
        $digestUp = strtoupper($digestName);
        
        foreach (array_keys($enzymes) as $key) {
            if (strtoupper($key) == $digestUp) {
                $classPath = __NAMESPACE__ . '\\Digest' . $key;
                return new $classPath();
            }
        }
        
        throw new \InvalidArgumentException('Unknown digest algorithm - ' . $digestName);
    }
public static function getDigest($digestName)
    {
        $enzymes = self::getEnzymes();
        $digestUp = strtoupper($digestName);
        
        foreach (array_keys($enzymes) as $key) {
            if (strtoupper($key) == $digestUp) {
                $classPath = __NAMESPACE__ . '\\Digest' . $key;
                return new $classPath();
            }
        }
        
        throw new \InvalidArgumentException('Unknown digest algorithm - ' . $digestName);
    }
public static function getDigest ( $ digestName ) { $ enzymes = self :: getEnzymes ( ) ; $ digestUp = strtoupper ( $ digestName ) ; foreach ( array_keys ( $ enzymes ) as $ key ) { if ( strtoupper ( $ key ) == $ digestUp ) { $ classPath = __NAMESPACE__ . '\\Digest' . $ key ; return new $ classPath ( ) ; } } throw new \ InvalidArgumentException ( 'Unknown digest algorithm - ' . $ digestName ) ; }
Gets the digest object associated with the enzyme

@param string $digestName
Name of the enzyme
@return \pgb_liv\php_ms\Utility\Digest\DigestTrypsin
Gets the digest object associated with the enzyme