1 | <?php |
||
13 | class Bib extends GhostModel |
||
14 | { |
||
15 | /** @var string */ |
||
16 | public $mms_id; |
||
17 | |||
18 | /* @var Holdings */ |
||
19 | public $holdings; |
||
20 | |||
21 | /* @var MarcRecord */ |
||
22 | protected $_marc; |
||
23 | |||
24 | public function __construct(Client $client = null, $mms_id = null) |
||
30 | |||
31 | /** |
||
32 | * Load MARC record onto this Bib object. Chainable method. |
||
33 | * |
||
34 | * @param string $xml |
||
35 | * |
||
36 | * @return Bib |
||
37 | */ |
||
38 | public function setMarcRecord($xml) |
||
48 | |||
49 | /** |
||
50 | * Initialize from SRU record without having to fetch the Bib record. |
||
51 | * @param SruRecord $record |
||
52 | * @param Client|null $client |
||
53 | * @return Bib |
||
54 | */ |
||
55 | public static function fromSruRecord(SruRecord $record, Client $client = null) |
||
63 | |||
64 | public function getHoldings() |
||
68 | |||
69 | public function save() |
||
85 | |||
86 | /** |
||
87 | * Get the MMS ID of the linked record in network zone. |
||
88 | */ |
||
89 | public function getNzMmsId() |
||
103 | |||
104 | /** |
||
105 | * Get the Bib of the linked record in network zone. |
||
106 | */ |
||
107 | public function getNzRecord() |
||
111 | |||
112 | /** |
||
113 | * Returns the MARC record. Load it if we don't have it yet. |
||
114 | */ |
||
115 | public function getRecord() |
||
122 | |||
123 | /** |
||
124 | * Store data onto object. |
||
125 | * |
||
126 | * @param \stdClass $data |
||
127 | */ |
||
128 | protected function setData(\stdClass $data) |
||
132 | |||
133 | /** |
||
134 | * Check if we have the full representation of our data object. |
||
135 | * |
||
136 | * @param \stdClass $data |
||
137 | * @return boolean |
||
138 | */ |
||
139 | protected function isInitialized($data) |
||
143 | |||
144 | /** |
||
145 | * Generate the base URL for this resource. |
||
146 | * |
||
147 | * @return string |
||
148 | */ |
||
149 | protected function urlBase() |
||
153 | } |
||
154 |
It seems like you allow that null is being passed for a parameter, however the function which is called does not seem to accept null.
We recommend to add an additional type check (or disallow null for the parameter):