Skip to content

Commit

Permalink
Add doc note explaining the wrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
danmichaelo committed Jan 14, 2017
1 parent a74007f commit 88cb636
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Record.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@
use Scriptotek\Marc\Fields\Subject;
use Scriptotek\Marc\Fields\Title;

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

0 comments on commit 88cb636

Please sign in to comment.