Skip to content

Releases: scriptotek/php-marc

Version 0.3.1

14 Jan 23:49
Compare
Choose a tag to compare

Version 0.3.0

19 Nov 22:31
Compare
Choose a tag to compare

Breaking changes:

  • Record::get() was replaced by Record::query(), which returns a QueryResult object rather than an array of strings. This allows access to the marc fields / subfields matched by the query.
  • Collection::records has been removed in favor of making the records available directly on the Collection class. Replace foreach ($collection->records as $record) with foreach ($collection as $record).
  • Subject::getType() now returns the tag number (like "650)" instead of a string representing the tag (like "topic"). Constants have been defined on Subject for comparison, so to check if a subject is a topical term, you can do $subject->type == Subject::TOPICAL_TERM.
  • Record::fromString now throws a RecordNotFound exception rather than an ErrorException exception if no record was found.
  • Record::getType now throws a UnknownRecordType exception rather than an ErrorException.