Ejemplo n.º 1
0
 public function getRecord(Request $request)
 {
     $record = new Record(new Querier());
     $record->getRecord($request->identifier);
     $xsl = new DOMDocument();
     $xsl->load('./xsl/GetRecord.xsl');
     $this->xslt->importStylesheet($xsl);
     $this->setupBasicParams($this->xslt);
     $this->setupDcParams($this->xslt, $record);
     return $this->xslt->transformToXml($xsl);
 }
Ejemplo n.º 2
0
 public function __construct(Querier $db)
 {
     $this->connection = $db->getConnection();
     $statement = $this->connection->prepare("SELECT subject_id FROM subject WHERE active = :active AND `type` = :type");
     $statement->bindParam(':active', $this->active);
     $statement->bindParam(':type', $this->type);
     $statement->execute();
     $subject_ids = $statement->fetchAll();
     foreach ($subject_ids as $subject_id) {
         $record = new Record($db);
         $record->getRecord($subject_id['subject_id']);
         $this->records[] = $record;
     }
 }