/** * Constructor. We build the object using data from the Hoopla records stored on disk. * Will be similar to a MarcRecord with slightly different functionality * * @param array|File_MARC_Record|string $record * @access public */ public function __construct($record) { if ($record instanceof File_MARC_Record) { $this->marcRecord = $record; } elseif (is_string($record)) { require_once ROOT_DIR . '/sys/MarcLoader.php'; $this->id = $record; $this->valid = MarcLoader::marcExistsForHooplaId($record); } else { // Call the parent's constructor... parent::__construct($record); // Also process the MARC record: require_once ROOT_DIR . '/sys/MarcLoader.php'; $this->marcRecord = MarcLoader::loadMarcRecordFromRecord($record); if (!$this->marcRecord) { $this->valid = false; } } parent::loadGroupedWork(); }