Skip to content

Commit 88cb636

Browse files
committed
Add doc note explaining the wrapping
1 parent a74007f commit 88cb636

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Record.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@
1111
use Scriptotek\Marc\Fields\Subject;
1212
use Scriptotek\Marc\Fields\Title;
1313

14+
/**
15+
* The MARC record wrapper.
16+
*
17+
* We wrap File_MARC_Record rather than extend it because we would otherwise
18+
* have to copy or rewrite the functionality in the `next()` and `_decode()`
19+
* methods of File_MARC and File_MARCXML, which are hard-wired to call
20+
* `new File_MARC_Record()`. The down-side of the wrapping approach is that we
21+
* break static code analysis and IDE code hinting.
22+
*/
1423
class Record
1524
{
1625
protected $record;

0 commit comments

Comments
 (0)