src/File_MARC_Reference.php
private function getFieldIndex($prevTag, $tag, $fieldIndex)
    {
        if ($prevTag == $tag or '' == $prevTag) {
            return $fieldIndex; // iteration of field index will continue
        }
        $specTag = $this->currentSpec['field']->getTag();
        if (preg_match('/'.$specTag.'/', $tag)) {
            // not same field tag, but field spec tag matches
            return $fieldIndex; // iteration of field index will continue
        }
        // not same field tag, iteration gets reset
        return $this->spec['field']->getIndexStart();
    }
private function getFieldIndex($prevTag, $tag, $fieldIndex)
    {
        if ($prevTag == $tag or '' == $prevTag) {
            return $fieldIndex; // iteration of field index will continue
        }
        $specTag = $this->currentSpec['field']->getTag();
        if (preg_match('/'.$specTag.'/', $tag)) {
            // not same field tag, but field spec tag matches
            return $fieldIndex; // iteration of field index will continue
        }
        // not same field tag, iteration gets reset
        return $this->spec['field']->getIndexStart();
    }
private function getFieldIndex ( $ prevTag , $ tag , $ fieldIndex ) { if ( $ prevTag == $ tag or '' == $ prevTag ) { return $ fieldIndex ; // iteration of field index will continue } $ specTag = $ this -> currentSpec [ 'field' ] -> getTag ( ) ; if ( preg_match ( '/' . $ specTag . '/' , $ tag ) ) { // not same field tag, but field spec tag matches return $ fieldIndex ; // iteration of field index will continue } // not same field tag, iteration gets reset return $ this -> spec [ 'field' ] -> getIndexStart ( ) ; }
Get the current field index.

@param string $prevTag    The previous field tag
@param string $tag        The current field tag
@param int    $fieldIndex The current field index

@return int $fieldIndex The current field index
Get the current field index .