Skip to content
Snippets Groups Projects
Commit 80cfdf78 authored by Demian Katz's avatar Demian Katz
Browse files

More static cleanup.

parent 03e9fc93
No related merge requests found
......@@ -52,7 +52,7 @@ class Results extends BaseResults
*
* @return SummonConnection
*/
public static function getSummonConnection()
public function getSummonConnection()
{
static $conn = false;
if (!$conn) {
......@@ -78,7 +78,7 @@ class Results extends BaseResults
$finalSort = ($sort == 'relevance') ? null : $sort;
// Perform the actual search
$summon = self::getSummonConnection();
$summon = $this->getSummonConnection();
$query = new SummonQuery(
$summon->buildQuery($this->getParams()->getSearchTerms()),
array(
......@@ -138,7 +138,7 @@ class Results extends BaseResults
*/
public function getRecord($id)
{
$summon = static::getSummonConnection();
$summon = $this->getSummonConnection();
$record = $summon->getRecord($id);
if (empty($record) || !isset($record['documents'][0])) {
throw new RecordMissingException(
......
......@@ -50,7 +50,7 @@ class Results extends BaseResults
*
* @return WorldCatConnection
*/
public static function getWorldCatConnection()
public function getWorldCatConnection()
{
static $wc = false;
if (!$wc) {
......@@ -69,7 +69,7 @@ class Results extends BaseResults
{
// Collect the search parameters:
$config = ConfigReader::getConfig();
$wc = static::getWorldCatConnection();
$wc = $this->getWorldCatConnection();
$overrideQuery = $this->getParams()->getOverrideQuery();
$query = empty($overrideQuery)
? $wc->buildQuery($this->getParams()->getSearchTerms()) : $overrideQuery;
......@@ -107,7 +107,7 @@ class Results extends BaseResults
*/
public function getRecord($id)
{
$wc = static::getWorldCatConnection();
$wc = $this->getWorldCatConnection();
$record = $wc->getRecord($id);
if (empty($record)) {
throw new RecordMissingException(
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment