Exemple #1
0
 static function make(QuiteSimpleXMLElement $doc, DeepLink $deeplinkProvider, $expanded = false, $options)
 {
     $is_group = $doc->text('./p:PrimoNMBib/p:record/p:facets/p:frbrtype') != '6' && $doc->text('./p:PrimoNMBib/p:record/p:display/p:version', '1') != '1';
     if ($is_group && !$expanded) {
         $item = new PrimoRecordGroup($doc, $deeplinkProvider, $options);
     } else {
         $item = new PrimoRecord($doc, $deeplinkProvider, $options);
     }
     return $item->process();
 }
Exemple #2
0
 /**
  * Create a new Response
  *
  * @param  QuiteSimpleXMLElement  $dom
  * @return void
  */
 public function __construct(QuiteSimpleXMLElement $dom = null)
 {
     $this->dom = $dom;
     $this->success = false;
     if (is_null($this->dom)) {
         return;
     }
     if ($this->dom->first('ns1:Problem')) {
         $this->error = $this->dom->text('ns1:Problem/ns1:ProblemType');
         $this->errorDetails = $this->dom->text('ns1:Problem/ns1:ProblemDetail');
     } else {
         $this->success = true;
     }
 }
 /**
  * Create a new record
  *
  * @param Danmichaelo\QuiteSimpleXMLElement\QuiteSimpleXMLElement $doc
  */
 public function __construct($doc)
 {
     $this->identifier = $doc->text('oai:header/oai:identifier');
     $this->datestamp = $doc->text('oai:header/oai:datestamp');
     $this->data = $doc->first('oai:metadata');
 }