src/Collection.php
public function recordFactory(File_MARC_Record $record)
    {
        try {
            $recordType = self::getRecordType($record);
        } catch (UnknownRecordType $e) {
            return new Record($record);
        }
        switch ($recordType) {
            case Marc21::BIBLIOGRAPHIC:
                return new BibliographicRecord($record);

            case Marc21::HOLDINGS:
                return new HoldingsRecord($record);

            case Marc21::AUTHORITY:
                return new AuthorityRecord($record);
        }
    }
public function recordFactory(File_MARC_Record $record)
    {
        try {
            $recordType = self::getRecordType($record);
        } catch (UnknownRecordType $e) {
            return new Record($record);
        }
        switch ($recordType) {
            case Marc21::BIBLIOGRAPHIC:
                return new BibliographicRecord($record);

            case Marc21::HOLDINGS:
                return new HoldingsRecord($record);

            case Marc21::AUTHORITY:
                return new AuthorityRecord($record);
        }
    }
public function recordFactory ( File_MARC_Record $ record ) { try { $ recordType = self :: getRecordType ( $ record ) ; } catch ( UnknownRecordType $ e ) { return new Record ( $ record ) ; } switch ( $ recordType ) { case Marc21 :: BIBLIOGRAPHIC : return new BibliographicRecord ( $ record ) ; case Marc21 :: HOLDINGS : return new HoldingsRecord ( $ record ) ; case Marc21 :: AUTHORITY : return new AuthorityRecord ( $ record ) ; } }
Creates a Record object from a File_MARC_Record object.

@param File_MARC_Record $record
@return AuthorityRecord|BibliographicRecord|HoldingsRecord
Creates a Record object from a File_MARC_Record object .