SS 4.0 - Update references to thirdparty Solr API as its not namespaced

This commit is contained in:
Brett Tasker 2017-04-22 21:25:41 +12:00
parent eac9485924
commit 0b7281b25e
3 changed files with 5 additions and 5 deletions

View File

@ -541,7 +541,7 @@ abstract class SolrIndex extends SearchIndex
{
$includeSubs = $options['include_children'];
$doc = new Apache_Solr_Document();
$doc = new \Apache_Solr_Document();
// Always present fields

View File

@ -25,7 +25,7 @@ class Solr4Service_Core extends SolrService_Core
* @inheritdoc
* @see Solr4Service_Core::addDocuments
*/
public function addDocument(Apache_Solr_Document $document, $allowDups = false,
public function addDocument(\Apache_Solr_Document $document, $allowDups = false,
$overwritePending = true, $overwriteCommitted = true, $commitWithin = 0
) {
return $this->addDocuments(array($document), $allowDups, $overwritePending, $overwriteCommitted, $commitWithin);
@ -44,7 +44,7 @@ class Solr4Service_Core extends SolrService_Core
$rawPost = "<add overwrite=\"{$overwriteVal}\"{$commitWithinString}>";
foreach ($documents as $document) {
if ($document instanceof Apache_Solr_Document) {
if ($document instanceof \Apache_Solr_Document) {
$rawPost .= $this->_documentToXmlFragment($document);
}
}

View File

@ -19,12 +19,12 @@ class SolrDocumentMatcher extends Hamcrest_BaseMatcher
public function describeTo(\Hamcrest_Description $description)
{
$description->appendText('Apache_Solr_Document with properties '.var_export($this->properties, true));
$description->appendText('\Apache_Solr_Document with properties '.var_export($this->properties, true));
}
public function matches($item)
{
if (! ($item instanceof Apache_Solr_Document)) {
if (! ($item instanceof \Apache_Solr_Document)) {
return false;
}