public static function fromSruRecord(SruRecord $record, Client $client = null)
    {
        $record->data->registerXPathNamespace('marc', 'http://www.loc.gov/MARC21/slim');
        $mmsId = $record->data->text('.//marc:controlfield[@tag="001"]');

        return (new self($client, $mmsId))
            ->setMarcRecord($record->data->asXML());
    }
public static function fromSruRecord(SruRecord $record, Client $client = null)
    {
        $record->data->registerXPathNamespace('marc', 'http://www.loc.gov/MARC21/slim');
        $mmsId = $record->data->text('.//marc:controlfield[@tag="001"]');

        return (new self($client, $mmsId))
            ->setMarcRecord($record->data->asXML());
    }
public static function fromSruRecord ( SruRecord $ record , Client $ client = null ) { $ record -> data -> registerXPathNamespace ( 'marc' , 'http://www.loc.gov/MARC21/slim' ) ; $ mmsId = $ record -> data -> text ( './/marc:controlfield[@tag="001"]' ) ; return ( new self ( $ client , $ mmsId ) ) -> setMarcRecord ( $ record -> data -> asXML ( ) ) ; }
Initialize from SRU record without having to fetch the Bib record.

@param SruRecord   $record
@param Client|null $client

@return Bib
Initialize from SRU record without having to fetch the Bib record .