コード例 #1
0
ファイル: Library.php プロジェクト: navtis/xerxes-search25
 /**
  * Load data from source array
  *
  * @param array $arr
  */
 public function load($arr)
 {
     $this->vars = $arr;
     // keep for use later
     $this->target_id = $arr['pz2_key'];
     foreach ($arr as $k => $v) {
         $this->pz2_key = $arr['pz2_key'];
     }
     $this->library_id = $arr['library_id'];
     $this->name = $arr['full_name'];
     $this->description = isset($arr['description']) ? $arr['description'] : '';
     $this->type = isset($arr['type']) ? $arr['type'] : '';
     $this->web['opac_url'] = isset($arr['opac_url']) ? $arr['opac_url'] : '';
     $this->web['information_url'] = isset($arr['visitor_information_url']) ? $arr['visitor_information_url'] : '';
     if ($this->type != 'virtual') {
         $this->address['address'] = isset($arr['address']) ? $arr['address'] : '';
         $this->address['postcode'] = isset($arr['postcode']) ? $arr['address'] : '';
         $this->contact['phone'] = isset($arr['phone']) ? $arr['phone'] : '';
         $this->contact['email'] = isset($arr['email']) ? $arr['email'] : '';
         $this->location['district'] = isset($arr['district']) ? $arr['district'] : '';
         $this->location['longitude'] = isset($arr['longitude']) ? $arr['longitude'] : '';
         $this->location['latitude'] = isset($arr['latitude']) ? $arr['latitude'] : '';
         $this->location['northing'] = isset($arr['northing']) ? $arr['northing'] : '';
         $this->location['easting'] = isset($arr['easting']) ? $arr['easting'] : '';
     }
     $subjects = new Subjects();
     $this->subjects = $subjects->getSubjectsByLibrary($this->pz2_key, $this->library_id);
     parent::load($arr);
 }
コード例 #2
0
ファイル: Subject.php プロジェクト: navtis/xerxes-pazpar2
 /**
  * Load data from subject results array
  *
  * @param array $arr
  */
 public function load($arr)
 {
     $this->vars = $arr;
     // keep for use later
     $this->subject_id = $this->vars['id'];
     $this->name = $this->vars['name'];
     $this->url = $this->vars['url'];
     $this->position = $this->vars['position'];
     parent::load($arr);
 }
コード例 #3
0
ファイル: Entitlement.php プロジェクト: navtis/xerxes-pazpar2
 /**
  * Load data from entitlement results array
  *
  * @param array $arr
  */
 public function __Construct($arr)
 {
     $this->vars = $arr;
     // keep for use later
     $this->rule_id = $this->vars['access_rule_id'];
     $this->name = $this->vars['entitlement_name'];
     $this->scheme = $this->vars['scheme_name'];
     $this->scheme_url = $this->vars['scheme_url'];
     $this->charges = $this->vars['charges'];
     $this->requirement = $this->vars['requirements'];
     parent::load($arr);
 }
コード例 #4
0
ファイル: Pz2Target.php プロジェクト: navtis/xerxes
 /**
  * Load data from target results array
  *
  * @param array $arrResult
  * @param User $user
  */
 public function load($arrResult)
 {
     $this->vars = $arrResult;
     // keep for use later
     $this->pz2_key = $this->vars['target_pz2_key'];
     $this->pz2_zurl = $this->vars['target_z3950_location'];
     $this->title_short = $this->vars['target_title_short'];
     $this->title_long = $this->vars['target_title_display'];
     $this->enabled = $this->vars['target_enabled'];
     $this->linkback_url = $this->vars['target_record_linkback'];
     // SEARCH25 specific variable
     $this->copac_key = $this->vars['target_copac_key'];
     parent::load($arrResult);
 }
コード例 #5
0
ファイル: Target.php プロジェクト: navtis/xerxes-pazpar2
 /**
  * Load data from target results array
  *
  * @param array $arr
  */
 public function load($arr)
 {
     $this->vars = $arr;
     // keep for use later
     $this->target_id = $this->vars['pz2_key'];
     $this->pz2_key = $this->vars['pz2_key'];
     $this->pz2_location = $this->vars['z3950_location'];
     $this->library_url = $this->vars['library_url'];
     $this->linkback_url = $this->vars['linkback_url'];
     $this->title_short = $this->vars['short_name'];
     $this->title_long = $this->vars['display_name'];
     if (isset($this->vars['domain'])) {
         $this->domain = $this->vars['domain'];
     }
     if (isset($this->vars['sort_name'])) {
         $this->sort_name = $this->vars['sort_name'];
     }
     parent::load($arr);
 }
コード例 #6
0
ファイル: Database.php プロジェクト: navtis/xerxes-pazpar2
 /**
  * Load data from database results array
  *
  * @param array $arrResult
  * @param User $user
  */
 public function load($arrResult)
 {
     parent::load($arrResult);
     $this->database_id = (string) $this->metalib_id;
     // @todo: remove this when switched to database_id
 }