From 88cb636757b4835a9738c7d09e9bde04074ff064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Michael=20O=2E=20Hegg=C3=B8?= Date: Sun, 15 Jan 2017 00:41:40 +0100 Subject: [PATCH] Add doc note explaining the wrapping --- src/Record.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Record.php b/src/Record.php index bf9801b..835e837 100644 --- a/src/Record.php +++ b/src/Record.php @@ -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;