Example #1
0
 public function __construct(Request $request = null, Config $config = null)
 {
     parent::__construct($request, $config);
     //Debug::dump($request);
     $this->targetnames = $request->getParam('target', null, true);
     //Debug::dump($this->targetnames);
 }
Example #2
0
 public function __construct(Request $request = null, Config $config = null)
 {
     parent::__construct($request, $config);
     $uo = new UserOptions($request);
     $tids = $uo->getSessionData('targets');
     $type = $uo->getSessionData('source_type');
     $this->targets = new Targets($type, $tids);
 }
Example #3
0
 /**
  * Create a Saved Record Query
  * 
  * @param Request $request
  * @param Config $config
  */
 public function __construct(Request $request = null, Config $config = null)
 {
     $final = parent::__construct($request, $config);
     // add the username as the first query term
     $term = new Search\QueryTerm();
     $term->phrase = $this->request->getSessionData('username');
     array_unshift($this->terms, $term);
 }
Example #4
0
 /**
  * Create an Ebsco Query
  *
  * @param Request $request
  * @param Config $config
  */
 public function __construct(Request $request = null, Config $config = null)
 {
     parent::__construct($request, $config);
     if ($this->config != null) {
         // server address
         $this->username = $this->config->getConfig("EBSCO_USERNAME");
         $this->password = $this->config->getConfig("EBSCO_PASSWORD");
     }
 }
Example #5
0
 /**
  * Create a Solr Query
  *
  * @param Request $request
  * @param Config $config
  */
 public function __construct(Request $request = null, Config $config = null)
 {
     parent::__construct($request, $config);
     if ($this->config != null) {
         // server address
         $this->server = $this->config->getConfig('SOLR', true);
         $this->server = rtrim($this->server, '/');
         $this->server .= "/select/?version=2.2";
         // limits set in config
         $auto_limit = $this->config->getConfig("LIMIT", false);
         if ($auto_limit != null) {
             $this->server .= "&fq=" . urlencode($auto_limit);
         }
     }
 }
Example #6
0
 /**
  * Create a Primo Query
  *
  * @param Request $request
  * @param Config $config
  */
 public function __construct(Request $request = null, Config $config = null)
 {
     parent::__construct($request, $config);
     // server info
     $this->server = $this->config->getConfig('PRIMO_ADDRESS', true);
     $this->server = rtrim($this->server, '/');
     // institutional id's
     $this->institution = $this->config->getConfig('INSTITUTION', true);
     $this->vid = $this->config->getConfig('VID', false);
     // scope
     $loc = $this->config->getConfig('LOC', false, $this->request->getParam('scope'));
     if ($loc != "") {
         $this->loc = explode(";", $loc);
     }
 }
Example #7
0
 /**
  * Create an EDS Query
  *
  * @param Request $request
  * @param Config $config
  */
 public function __construct(Request $request = null, Config $config = null)
 {
     parent::__construct($request, $config);
     // server address
     $this->server = 'http://eds-api.ebscohost.com/edsapi/rest/';
     $profile = 'edsapi';
     if ($request != null) {
         // set session id
         $this->session_id = $request->getSessionData('ebsco_session');
         if ($this->session_id == "") {
             $this->session_id = $this->createSession($profile);
         }
         $this->request->setSessionData('ebsco_session', $this->session_id);
     }
     $this->headers = array('Accept' => 'application/json', 'x-sessionToken' => $this->session_id);
 }