Skip to content

Commit 07b86da

Browse files
committed
Add Classification.getType()
1 parent 5853089 commit 07b86da

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2020
- `getPartOf()` for 773 fields
2121
- Added a `mapSubFields()` method to the `Field` class.
2222
- Made the `Record` class JSON serializable.
23-
23+
- Added a `getType()` and `getTag()` method to `Classification`.
2424
### Changed
2525

2626
- Changed the `Field::sf()` method to return `NULL`, not an empty string,

src/Fields/Classification.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ class Classification extends Subfield implements \JsonSerializable
88
{
99
use SerializableField;
1010

11+
const UDC = '080';
12+
const DEWEY = '082';
13+
const ADD_DEWEY = '082';
14+
const OTHER_SCHEME = '084';
15+
1116
/**
1217
* @var array List of properties to be included when serializing the record using the `toArray()` method.
1318
*/
@@ -25,6 +30,16 @@ public static function get(Record $record)
2530
return $out;
2631
}
2732

33+
public function getType()
34+
{
35+
return $this->getTag();
36+
}
37+
38+
public function getTag()
39+
{
40+
return $this->field->getTag();
41+
}
42+
2843
public function getScheme()
2944
{
3045
$typeMap = [

0 commit comments

Comments
 (0)