src/Core/Modification.php
public function setPosition($position)
    {
        switch ($position) {
            case Modification::POSITION_ANY:
            case Modification::POSITION_NTERM:
            case Modification::POSITION_CTERM:
            case Modification::POSITION_PROTEIN_NTERM:
            case Modification::POSITION_PROTEIN_CTERM:
                $this->position = $position;
                
                break;
            default:
                throw new \InvalidArgumentException('Postion must be any or terminus (see POSITION_XXXX)');
        }
    }
public function setPosition($position)
    {
        switch ($position) {
            case Modification::POSITION_ANY:
            case Modification::POSITION_NTERM:
            case Modification::POSITION_CTERM:
            case Modification::POSITION_PROTEIN_NTERM:
            case Modification::POSITION_PROTEIN_CTERM:
                $this->position = $position;
                
                break;
            default:
                throw new \InvalidArgumentException('Postion must be any or terminus (see POSITION_XXXX)');
        }
    }
public function setPosition ( $ position ) { switch ( $ position ) { case Modification :: POSITION_ANY : case Modification :: POSITION_NTERM : case Modification :: POSITION_CTERM : case Modification :: POSITION_PROTEIN_NTERM : case Modification :: POSITION_PROTEIN_CTERM : $ this -> position = $ position ; break ; default : throw new \ InvalidArgumentException ( 'Postion must be any or terminus (see POSITION_XXXX)' ) ; } }
Sets the position this modification can occur on within the peptide or protein.
Default is 'Any'.

@param int $position
Position the modification can occur, see POSITION_ for list of options.
@throws \InvalidArgumentException If unknown position specified
Sets the position this modification can occur on within the peptide or protein . Default is Any .