src/Reader/MzIdentMlReader1r1.php
private function getEnzyme(\SimpleXMLElement $xmlEnzyme)
    {
        $enzyme = array();

        foreach ($xmlEnzyme->attributes() as $attribute => $value) {
            switch ($attribute) {
                case 'cTermGain':
                    $enzyme['cTermGain'] = (string) $value;
                    break;
                case 'id':
                    $enzyme['id'] = (string) $value;
                    break;
                case 'minDistance':
                    $enzyme['minDistance'] = (int) $value;
                    break;
                case 'missedCleavages':
                    $enzyme['missedCleavages'] = (int) $value;
                    break;
                case 'nTermGain':
                    $enzyme['nTermGain'] = (string) $value;
                    break;
                case 'name':
                    $enzyme['name'] = (string) $value;
                    break;
                case 'semiSpecific':
                    $enzyme['semiSpecific'] = (string) $value == 'true';
                    break;
                default:
                    // Unknown element
                    break;
            }
        }

        if (isset($xmlEnzyme->EnzymeName)) {
            $enzyme['EnzymeName'] = $this->getEnzymeName($xmlEnzyme->EnzymeName);
        }

        return $enzyme;
    }
private function getEnzyme(\SimpleXMLElement $xmlEnzyme)
    {
        $enzyme = array();

        foreach ($xmlEnzyme->attributes() as $attribute => $value) {
            switch ($attribute) {
                case 'cTermGain':
                    $enzyme['cTermGain'] = (string) $value;
                    break;
                case 'id':
                    $enzyme['id'] = (string) $value;
                    break;
                case 'minDistance':
                    $enzyme['minDistance'] = (int) $value;
                    break;
                case 'missedCleavages':
                    $enzyme['missedCleavages'] = (int) $value;
                    break;
                case 'nTermGain':
                    $enzyme['nTermGain'] = (string) $value;
                    break;
                case 'name':
                    $enzyme['name'] = (string) $value;
                    break;
                case 'semiSpecific':
                    $enzyme['semiSpecific'] = (string) $value == 'true';
                    break;
                default:
                    // Unknown element
                    break;
            }
        }

        if (isset($xmlEnzyme->EnzymeName)) {
            $enzyme['EnzymeName'] = $this->getEnzymeName($xmlEnzyme->EnzymeName);
        }

        return $enzyme;
    }
private function getEnzyme ( \ SimpleXMLElement $ xmlEnzyme ) { $ enzyme = array ( ) ; foreach ( $ xmlEnzyme -> attributes ( ) as $ attribute => $ value ) { switch ( $ attribute ) { case 'cTermGain' : $ enzyme [ 'cTermGain' ] = ( string ) $ value ; break ; case 'id' : $ enzyme [ 'id' ] = ( string ) $ value ; break ; case 'minDistance' : $ enzyme [ 'minDistance' ] = ( int ) $ value ; break ; case 'missedCleavages' : $ enzyme [ 'missedCleavages' ] = ( int ) $ value ; break ; case 'nTermGain' : $ enzyme [ 'nTermGain' ] = ( string ) $ value ; break ; case 'name' : $ enzyme [ 'name' ] = ( string ) $ value ; break ; case 'semiSpecific' : $ enzyme [ 'semiSpecific' ] = ( string ) $ value == 'true' ; break ; default : // Unknown element break ; } } if ( isset ( $ xmlEnzyme -> EnzymeName ) ) { $ enzyme [ 'EnzymeName' ] = $ this -> getEnzymeName ( $ xmlEnzyme -> EnzymeName ) ; } return $ enzyme ; }
The details of an individual cleavage enzyme should be provided by giving a regular expression or a CV term if a "standard" enzyme cleavage has been
performed.

@param \SimpleXMLElement $xmlEnzyme
The XML element
@return string[]|number[]|boolean[]|NULL[]|string[][]
The details of an individual cleavage enzyme should be provided by giving a regular expression or a CV term if a standard enzyme cleavage has been performed .