src/Utility/Fragment/FragmentFactory.php
public static function getMethodFragments($method, ModifiableSequenceInterface $sequence)
    {
        $fragmentTypes = array();
        
        switch (strtoupper($method)) {
            case 'CID':
            case 'HCD':
                $fragmentTypes['B'] = new BFragment($sequence);
                $fragmentTypes['Y'] = new YFragment($sequence);
                break;
            case 'ECD':
                $fragmentTypes['C'] = new CFragment($sequence);
                $fragmentTypes['Z'] = new ZFragment($sequence);
                $fragmentTypes['B'] = new BFragment($sequence);
                break;
            case 'ETD':
                $fragmentTypes['C'] = new CFragment($sequence);
                $fragmentTypes['Z'] = new ZFragment($sequence);
                break;
            case 'CTD':
            case 'EDD':
            case 'NETD':
                $fragmentTypes['A'] = new AFragment($sequence);
                $fragmentTypes['X'] = new XFragment($sequence);
                break;
            case 'ETHCD':
                $fragmentTypes['B'] = new BFragment($sequence);
                $fragmentTypes['Y'] = new YFragment($sequence);
                $fragmentTypes['C'] = new CFragment($sequence);
                $fragmentTypes['Z'] = new ZFragment($sequence);
                break;
            default:
                throw new \InvalidArgumentException('Unknown fragmentation method type "' . $method . '"');
        }
        
        return $fragmentTypes;
    }
public static function getMethodFragments($method, ModifiableSequenceInterface $sequence)
    {
        $fragmentTypes = array();
        
        switch (strtoupper($method)) {
            case 'CID':
            case 'HCD':
                $fragmentTypes['B'] = new BFragment($sequence);
                $fragmentTypes['Y'] = new YFragment($sequence);
                break;
            case 'ECD':
                $fragmentTypes['C'] = new CFragment($sequence);
                $fragmentTypes['Z'] = new ZFragment($sequence);
                $fragmentTypes['B'] = new BFragment($sequence);
                break;
            case 'ETD':
                $fragmentTypes['C'] = new CFragment($sequence);
                $fragmentTypes['Z'] = new ZFragment($sequence);
                break;
            case 'CTD':
            case 'EDD':
            case 'NETD':
                $fragmentTypes['A'] = new AFragment($sequence);
                $fragmentTypes['X'] = new XFragment($sequence);
                break;
            case 'ETHCD':
                $fragmentTypes['B'] = new BFragment($sequence);
                $fragmentTypes['Y'] = new YFragment($sequence);
                $fragmentTypes['C'] = new CFragment($sequence);
                $fragmentTypes['Z'] = new ZFragment($sequence);
                break;
            default:
                throw new \InvalidArgumentException('Unknown fragmentation method type "' . $method . '"');
        }
        
        return $fragmentTypes;
    }
public static function getMethodFragments ( $ method , ModifiableSequenceInterface $ sequence ) { $ fragmentTypes = array ( ) ; switch ( strtoupper ( $ method ) ) { case 'CID' : case 'HCD' : $ fragmentTypes [ 'B' ] = new BFragment ( $ sequence ) ; $ fragmentTypes [ 'Y' ] = new YFragment ( $ sequence ) ; break ; case 'ECD' : $ fragmentTypes [ 'C' ] = new CFragment ( $ sequence ) ; $ fragmentTypes [ 'Z' ] = new ZFragment ( $ sequence ) ; $ fragmentTypes [ 'B' ] = new BFragment ( $ sequence ) ; break ; case 'ETD' : $ fragmentTypes [ 'C' ] = new CFragment ( $ sequence ) ; $ fragmentTypes [ 'Z' ] = new ZFragment ( $ sequence ) ; break ; case 'CTD' : case 'EDD' : case 'NETD' : $ fragmentTypes [ 'A' ] = new AFragment ( $ sequence ) ; $ fragmentTypes [ 'X' ] = new XFragment ( $ sequence ) ; break ; case 'ETHCD' : $ fragmentTypes [ 'B' ] = new BFragment ( $ sequence ) ; $ fragmentTypes [ 'Y' ] = new YFragment ( $ sequence ) ; $ fragmentTypes [ 'C' ] = new CFragment ( $ sequence ) ; $ fragmentTypes [ 'Z' ] = new ZFragment ( $ sequence ) ; break ; default : throw new \ InvalidArgumentException ( 'Unknown fragmentation method type "' . $ method . '"' ) ; } return $ fragmentTypes ; }
For a specified method, returns the possible fragmentat ion types that may be produced

@param string $method
The method to get fragment types for
@param ModifiableSequenceInterface $sequence
The peptide or protein sequence object to get fragment types for
@return FragmentInterface[]
For a specified method returns the possible fragmentat ion types that may be produced