first import
This commit is contained in:
367
SolrPhpClient/Apache/Solr/Document.php
Normal file
367
SolrPhpClient/Apache/Solr/Document.php
Normal file
@@ -0,0 +1,367 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* - Neither the name of Servigistics, Inc. nor the names of
|
||||
* its contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @copyright Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)
|
||||
* @license http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD
|
||||
* @version $Id: Document.php 54 2011-02-04 16:29:18Z donovan.jimenez $
|
||||
*
|
||||
* @package Apache
|
||||
* @subpackage Solr
|
||||
* @author Donovan Jimenez <djimenez@conduit-it.com>
|
||||
*/
|
||||
|
||||
/**
|
||||
* Holds Key / Value pairs that represent a Solr Document along with any associated boost
|
||||
* values. Field values can be accessed by direct dereferencing such as:
|
||||
* <code>
|
||||
* ...
|
||||
* $document->title = 'Something';
|
||||
* echo $document->title;
|
||||
* ...
|
||||
* </code>
|
||||
*
|
||||
* Additionally, the field values can be iterated with foreach
|
||||
*
|
||||
* <code>
|
||||
* foreach ($document as $fieldName => $fieldValue)
|
||||
* {
|
||||
* ...
|
||||
* }
|
||||
* </code>
|
||||
*/
|
||||
class Apache_Solr_Document implements IteratorAggregate
|
||||
{
|
||||
/**
|
||||
* SVN Revision meta data for this class
|
||||
*/
|
||||
const SVN_REVISION = '$Revision: 54 $';
|
||||
|
||||
/**
|
||||
* SVN ID meta data for this class
|
||||
*/
|
||||
const SVN_ID = '$Id: Document.php 54 2011-02-04 16:29:18Z donovan.jimenez $';
|
||||
|
||||
/**
|
||||
* Document boost value
|
||||
*
|
||||
* @var float
|
||||
*/
|
||||
protected $_documentBoost = false;
|
||||
|
||||
/**
|
||||
* Document field values, indexed by name
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $_fields = array();
|
||||
|
||||
/**
|
||||
* Document field boost values, indexed by name
|
||||
*
|
||||
* @var array array of floats
|
||||
*/
|
||||
protected $_fieldBoosts = array();
|
||||
|
||||
/**
|
||||
* Clear all boosts and fields from this document
|
||||
*/
|
||||
public function clear()
|
||||
{
|
||||
$this->_documentBoost = false;
|
||||
|
||||
$this->_fields = array();
|
||||
$this->_fieldBoosts = array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get current document boost
|
||||
*
|
||||
* @return mixed will be false for default, or else a float
|
||||
*/
|
||||
public function getBoost()
|
||||
{
|
||||
return $this->_documentBoost;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set document boost factor
|
||||
*
|
||||
* @param mixed $boost Use false for default boost, else cast to float that should be > 0 or will be treated as false
|
||||
*/
|
||||
public function setBoost($boost)
|
||||
{
|
||||
$boost = (float) $boost;
|
||||
|
||||
if ($boost > 0.0)
|
||||
{
|
||||
$this->_documentBoost = $boost;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_documentBoost = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a value to a multi-valued field
|
||||
*
|
||||
* NOTE: the solr XML format allows you to specify boosts
|
||||
* PER value even though the underlying Lucene implementation
|
||||
* only allows a boost per field. To remedy this, the final
|
||||
* field boost value will be the product of all specified boosts
|
||||
* on field values - this is similar to SolrJ's functionality.
|
||||
*
|
||||
* <code>
|
||||
* $doc = new Apache_Solr_Document();
|
||||
*
|
||||
* $doc->addField('foo', 'bar', 2.0);
|
||||
* $doc->addField('foo', 'baz', 3.0);
|
||||
*
|
||||
* // resultant field boost will be 6!
|
||||
* echo $doc->getFieldBoost('foo');
|
||||
* </code>
|
||||
*
|
||||
* @param string $key
|
||||
* @param mixed $value
|
||||
* @param mixed $boost Use false for default boost, else cast to float that should be > 0 or will be treated as false
|
||||
*/
|
||||
public function addField($key, $value, $boost = false)
|
||||
{
|
||||
if (!isset($this->_fields[$key]))
|
||||
{
|
||||
// create holding array if this is the first value
|
||||
$this->_fields[$key] = array();
|
||||
}
|
||||
else if (!is_array($this->_fields[$key]))
|
||||
{
|
||||
// move existing value into array if it is not already an array
|
||||
$this->_fields[$key] = array($this->_fields[$key]);
|
||||
}
|
||||
|
||||
if ($this->getFieldBoost($key) === false)
|
||||
{
|
||||
// boost not already set, set it now
|
||||
$this->setFieldBoost($key, $boost);
|
||||
}
|
||||
else if ((float) $boost > 0.0)
|
||||
{
|
||||
// multiply passed boost with current field boost - similar to SolrJ implementation
|
||||
$this->_fieldBoosts[$key] *= (float) $boost;
|
||||
}
|
||||
|
||||
// add value to array
|
||||
$this->_fields[$key][] = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the array manipulation for a multi-valued field
|
||||
*
|
||||
* @param string $key
|
||||
* @param string $value
|
||||
* @param mixed $boost Use false for default boost, else cast to float that should be > 0 or will be treated as false
|
||||
*
|
||||
* @deprecated Use addField(...) instead
|
||||
*/
|
||||
public function setMultiValue($key, $value, $boost = false)
|
||||
{
|
||||
$this->addField($key, $value, $boost);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get field information
|
||||
*
|
||||
* @param string $key
|
||||
* @return mixed associative array of info if field exists, false otherwise
|
||||
*/
|
||||
public function getField($key)
|
||||
{
|
||||
if (isset($this->_fields[$key]))
|
||||
{
|
||||
return array(
|
||||
'name' => $key,
|
||||
'value' => $this->_fields[$key],
|
||||
'boost' => $this->getFieldBoost($key)
|
||||
);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a field value. Multi-valued fields should be set as arrays
|
||||
* or instead use the addField(...) function which will automatically
|
||||
* make sure the field is an array.
|
||||
*
|
||||
* @param string $key
|
||||
* @param mixed $value
|
||||
* @param mixed $boost Use false for default boost, else cast to float that should be > 0 or will be treated as false
|
||||
*/
|
||||
public function setField($key, $value, $boost = false)
|
||||
{
|
||||
$this->_fields[$key] = $value;
|
||||
$this->setFieldBoost($key, $boost);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the currently set field boost for a document field
|
||||
*
|
||||
* @param string $key
|
||||
* @return float currently set field boost, false if one is not set
|
||||
*/
|
||||
public function getFieldBoost($key)
|
||||
{
|
||||
return isset($this->_fieldBoosts[$key]) ? $this->_fieldBoosts[$key] : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the field boost for a document field
|
||||
*
|
||||
* @param string $key field name for the boost
|
||||
* @param mixed $boost Use false for default boost, else cast to float that should be > 0 or will be treated as false
|
||||
*/
|
||||
public function setFieldBoost($key, $boost)
|
||||
{
|
||||
$boost = (float) $boost;
|
||||
|
||||
if ($boost > 0.0)
|
||||
{
|
||||
$this->_fieldBoosts[$key] = $boost;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_fieldBoosts[$key] = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return current field boosts, indexed by field name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getFieldBoosts()
|
||||
{
|
||||
return $this->_fieldBoosts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the names of all fields in this document
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getFieldNames()
|
||||
{
|
||||
return array_keys($this->_fields);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the values of all fields in this document
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getFieldValues()
|
||||
{
|
||||
return array_values($this->_fields);
|
||||
}
|
||||
|
||||
/**
|
||||
* IteratorAggregate implementation function. Allows usage:
|
||||
*
|
||||
* <code>
|
||||
* foreach ($document as $key => $value)
|
||||
* {
|
||||
* ...
|
||||
* }
|
||||
* </code>
|
||||
*/
|
||||
public function getIterator()
|
||||
{
|
||||
$arrayObject = new ArrayObject($this->_fields);
|
||||
|
||||
return $arrayObject->getIterator();
|
||||
}
|
||||
|
||||
/**
|
||||
* Magic get for field values
|
||||
*
|
||||
* @param string $key
|
||||
* @return mixed
|
||||
*/
|
||||
public function __get($key)
|
||||
{
|
||||
if (isset($this->_fields[$key]))
|
||||
{
|
||||
return $this->_fields[$key];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Magic set for field values. Multi-valued fields should be set as arrays
|
||||
* or instead use the addField(...) function which will automatically
|
||||
* make sure the field is an array.
|
||||
*
|
||||
* @param string $key
|
||||
* @param mixed $value
|
||||
*/
|
||||
public function __set($key, $value)
|
||||
{
|
||||
$this->setField($key, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Magic isset for fields values. Do not call directly. Allows usage:
|
||||
*
|
||||
* <code>
|
||||
* isset($document->some_field);
|
||||
* </code>
|
||||
*
|
||||
* @param string $key
|
||||
* @return boolean
|
||||
*/
|
||||
public function __isset($key)
|
||||
{
|
||||
return isset($this->_fields[$key]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Magic unset for field values. Do not call directly. Allows usage:
|
||||
*
|
||||
* <code>
|
||||
* unset($document->some_field);
|
||||
* </code>
|
||||
*
|
||||
* @param string $key
|
||||
*/
|
||||
public function __unset($key)
|
||||
{
|
||||
unset($this->_fields[$key]);
|
||||
unset($this->_fieldBoosts[$key]);
|
||||
}
|
||||
}
|
||||
50
SolrPhpClient/Apache/Solr/Exception.php
Normal file
50
SolrPhpClient/Apache/Solr/Exception.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* - Neither the name of Servigistics, Inc. nor the names of
|
||||
* its contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @copyright Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)
|
||||
* @license http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD
|
||||
* @version $Id: Exception.php 54 2011-02-04 16:29:18Z donovan.jimenez $
|
||||
*
|
||||
* @package Apache
|
||||
* @subpackage Solr
|
||||
* @author Donovan Jimenez <djimenez@conduit-it.com>
|
||||
*/
|
||||
|
||||
class Apache_Solr_Exception extends Exception
|
||||
{
|
||||
/**
|
||||
* SVN Revision meta data for this class
|
||||
*/
|
||||
const SVN_REVISION = '$Revision: 54 $';
|
||||
|
||||
/**
|
||||
* SVN ID meta data for this class
|
||||
*/
|
||||
const SVN_ID = '$Id: Exception.php 54 2011-02-04 16:29:18Z donovan.jimenez $';
|
||||
}
|
||||
89
SolrPhpClient/Apache/Solr/HttpTransport/Abstract.php
Normal file
89
SolrPhpClient/Apache/Solr/HttpTransport/Abstract.php
Normal file
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* - Neither the name of Servigistics, Inc. nor the names of
|
||||
* its contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @copyright Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)
|
||||
* @license http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD
|
||||
* @version $Id: $
|
||||
*
|
||||
* @package Apache
|
||||
* @subpackage Solr
|
||||
* @author Timo Schmidt <timo.schmidt@aoemedia.de>, Donovan Jimenez <djimenez@conduit-it.com>
|
||||
*/
|
||||
|
||||
/**
|
||||
* Convenience class that implements the transport implementation. Can be extended by
|
||||
* real implementations to do some of the common book keeping
|
||||
*/
|
||||
abstract class Apache_Solr_HttpTransport_Abstract implements Apache_Solr_HttpTransport_Interface
|
||||
{
|
||||
/**
|
||||
* Our default timeout value for requests that don't specify a timeout
|
||||
*
|
||||
* @var float
|
||||
*/
|
||||
private $_defaultTimeout = false;
|
||||
|
||||
/**
|
||||
* Get the current default timeout setting (initially the default_socket_timeout ini setting)
|
||||
* in seconds
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getDefaultTimeout()
|
||||
{
|
||||
// lazy load the default timeout from the ini settings
|
||||
if ($this->_defaultTimeout === false)
|
||||
{
|
||||
$this->_defaultTimeout = (int) ini_get('default_socket_timeout');
|
||||
|
||||
// double check we didn't get 0 for a timeout
|
||||
if ($this->_defaultTimeout <= 0)
|
||||
{
|
||||
$this->_defaultTimeout = 60;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->_defaultTimeout;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the current default timeout for all HTTP requests
|
||||
*
|
||||
* @param float $timeout
|
||||
*/
|
||||
public function setDefaultTimeout($timeout)
|
||||
{
|
||||
$timeout = (float) $timeout;
|
||||
|
||||
if ($timeout >= 0)
|
||||
{
|
||||
$this->_defaultTimeout = $timeout;
|
||||
}
|
||||
}
|
||||
}
|
||||
198
SolrPhpClient/Apache/Solr/HttpTransport/Curl.php
Normal file
198
SolrPhpClient/Apache/Solr/HttpTransport/Curl.php
Normal file
@@ -0,0 +1,198 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* - Neither the name of Servigistics, Inc. nor the names of
|
||||
* its contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @copyright Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)
|
||||
* @license http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD
|
||||
* @version $Id: $
|
||||
*
|
||||
* @package Apache
|
||||
* @subpackage Solr
|
||||
* @author Timo Schmidt <timo.schmidt@aoemedia.de>, Donovan Jimenez <djimenez@conduit-it.com>
|
||||
*/
|
||||
|
||||
// Require Apache_Solr_HttpTransport_Abstract
|
||||
require_once(dirname(__FILE__) . '/Abstract.php');
|
||||
|
||||
/**
|
||||
* A Curl based HTTP transport. Uses a single curl session for all requests.
|
||||
*/
|
||||
class Apache_Solr_HttpTransport_Curl extends Apache_Solr_HttpTransport_Abstract
|
||||
{
|
||||
/**
|
||||
* SVN Revision meta data for this class
|
||||
*/
|
||||
const SVN_REVISION = '$Revision:$';
|
||||
|
||||
/**
|
||||
* SVN ID meta data for this class
|
||||
*/
|
||||
const SVN_ID = '$Id:$';
|
||||
|
||||
/**
|
||||
* Curl Session Handle
|
||||
*
|
||||
* @var resource
|
||||
*/
|
||||
private $_curl;
|
||||
|
||||
/**
|
||||
* Initializes a curl session
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
// initialize a CURL session
|
||||
$this->_curl = curl_init();
|
||||
|
||||
// set common options that will not be changed during the session
|
||||
curl_setopt_array($this->_curl, array(
|
||||
// return the response body from curl_exec
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
|
||||
// get the output as binary data
|
||||
CURLOPT_BINARYTRANSFER => true,
|
||||
|
||||
// we do not need the headers in the output, we get everything we need from curl_getinfo
|
||||
CURLOPT_HEADER => false
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Closes a curl session
|
||||
*/
|
||||
function __destruct()
|
||||
{
|
||||
// close our curl session
|
||||
curl_close($this->_curl);
|
||||
}
|
||||
|
||||
public function performGetRequest($url, $timeout = false)
|
||||
{
|
||||
// check the timeout value
|
||||
if ($timeout === false || $timeout <= 0.0)
|
||||
{
|
||||
// use the default timeout
|
||||
$timeout = $this->getDefaultTimeout();
|
||||
}
|
||||
|
||||
// set curl GET options
|
||||
curl_setopt_array($this->_curl, array(
|
||||
// make sure we're returning the body
|
||||
CURLOPT_NOBODY => false,
|
||||
|
||||
// make sure we're GET
|
||||
CURLOPT_HTTPGET => true,
|
||||
|
||||
// set the URL
|
||||
CURLOPT_URL => $url,
|
||||
|
||||
// set the timeout
|
||||
CURLOPT_TIMEOUT => $timeout
|
||||
));
|
||||
|
||||
// make the request
|
||||
$responseBody = curl_exec($this->_curl);
|
||||
|
||||
// get info from the transfer
|
||||
$statusCode = curl_getinfo($this->_curl, CURLINFO_HTTP_CODE);
|
||||
$contentType = curl_getinfo($this->_curl, CURLINFO_CONTENT_TYPE);
|
||||
|
||||
return new Apache_Solr_HttpTransport_Response($statusCode, $contentType, $responseBody);
|
||||
}
|
||||
|
||||
public function performHeadRequest($url, $timeout = false)
|
||||
{
|
||||
// check the timeout value
|
||||
if ($timeout === false || $timeout <= 0.0)
|
||||
{
|
||||
// use the default timeout
|
||||
$timeout = $this->getDefaultTimeout();
|
||||
}
|
||||
|
||||
// set curl HEAD options
|
||||
curl_setopt_array($this->_curl, array(
|
||||
// this both sets the method to HEAD and says not to return a body
|
||||
CURLOPT_NOBODY => true,
|
||||
|
||||
// set the URL
|
||||
CURLOPT_URL => $url,
|
||||
|
||||
// set the timeout
|
||||
CURLOPT_TIMEOUT => $timeout
|
||||
));
|
||||
|
||||
// make the request
|
||||
$responseBody = curl_exec($this->_curl);
|
||||
|
||||
// get info from the transfer
|
||||
$statusCode = curl_getinfo($this->_curl, CURLINFO_HTTP_CODE);
|
||||
$contentType = curl_getinfo($this->_curl, CURLINFO_CONTENT_TYPE);
|
||||
|
||||
return new Apache_Solr_HttpTransport_Response($statusCode, $contentType, $responseBody);
|
||||
}
|
||||
|
||||
public function performPostRequest($url, $postData, $contentType, $timeout = false)
|
||||
{
|
||||
// check the timeout value
|
||||
if ($timeout === false || $timeout <= 0.0)
|
||||
{
|
||||
// use the default timeout
|
||||
$timeout = $this->getDefaultTimeout();
|
||||
}
|
||||
|
||||
// set curl POST options
|
||||
curl_setopt_array($this->_curl, array(
|
||||
// make sure we're returning the body
|
||||
CURLOPT_NOBODY => false,
|
||||
|
||||
// make sure we're POST
|
||||
CURLOPT_POST => true,
|
||||
|
||||
// set the URL
|
||||
CURLOPT_URL => $url,
|
||||
|
||||
// set the post data
|
||||
CURLOPT_POSTFIELDS => $postData,
|
||||
|
||||
// set the content type
|
||||
CURLOPT_HTTPHEADER => array("Content-Type: {$contentType}"),
|
||||
|
||||
// set the timeout
|
||||
CURLOPT_TIMEOUT => $timeout
|
||||
));
|
||||
|
||||
// make the request
|
||||
$responseBody = curl_exec($this->_curl);
|
||||
|
||||
// get info from the transfer
|
||||
$statusCode = curl_getinfo($this->_curl, CURLINFO_HTTP_CODE);
|
||||
$contentType = curl_getinfo($this->_curl, CURLINFO_CONTENT_TYPE);
|
||||
|
||||
return new Apache_Solr_HttpTransport_Response($statusCode, $contentType, $responseBody);
|
||||
}
|
||||
}
|
||||
196
SolrPhpClient/Apache/Solr/HttpTransport/CurlNoReuse.php
Normal file
196
SolrPhpClient/Apache/Solr/HttpTransport/CurlNoReuse.php
Normal file
@@ -0,0 +1,196 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* - Neither the name of Servigistics, Inc. nor the names of
|
||||
* its contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @copyright Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)
|
||||
* @license http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD
|
||||
* @version $Id: $
|
||||
*
|
||||
* @package Apache
|
||||
* @subpackage Solr
|
||||
* @author Timo Schmidt <timo.schmidt@aoemedia.de>, Donovan Jimenez <djimenez@conduit-it.com>
|
||||
*/
|
||||
|
||||
// Require Apache_Solr_HttpTransport_Abstract
|
||||
require_once(dirname(__FILE__) . '/Abstract.php');
|
||||
|
||||
/**
|
||||
* An alternative Curl HTTP transport that opens and closes a curl session for
|
||||
* every request. This isn't the recommended way to use curl, but some version of
|
||||
* PHP have memory issues.
|
||||
*/
|
||||
class Apache_Solr_HttpTransport_CurlNoReuse extends Apache_Solr_HttpTransport_Abstract
|
||||
{
|
||||
/**
|
||||
* SVN Revision meta data for this class
|
||||
*/
|
||||
const SVN_REVISION = '$Revision:$';
|
||||
|
||||
/**
|
||||
* SVN ID meta data for this class
|
||||
*/
|
||||
const SVN_ID = '$Id:$';
|
||||
|
||||
public function performGetRequest($url, $timeout = false)
|
||||
{
|
||||
// check the timeout value
|
||||
if ($timeout === false || $timeout <= 0.0)
|
||||
{
|
||||
// use the default timeout
|
||||
$timeout = $this->getDefaultTimeout();
|
||||
}
|
||||
|
||||
$curl = curl_init();
|
||||
|
||||
// set curl GET options
|
||||
curl_setopt_array($curl, array(
|
||||
// return the response body from curl_exec
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
|
||||
// get the output as binary data
|
||||
CURLOPT_BINARYTRANSFER => true,
|
||||
|
||||
// we do not need the headers in the output, we get everything we need from curl_getinfo
|
||||
CURLOPT_HEADER => false,
|
||||
|
||||
// set the URL
|
||||
CURLOPT_URL => $url,
|
||||
|
||||
// set the timeout
|
||||
CURLOPT_TIMEOUT => $timeout
|
||||
));
|
||||
|
||||
// make the request
|
||||
$responseBody = curl_exec($curl);
|
||||
|
||||
// get info from the transfer
|
||||
$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
|
||||
$contentType = curl_getinfo($curl, CURLINFO_CONTENT_TYPE);
|
||||
|
||||
// close our curl session - we're done with it
|
||||
curl_close($curl);
|
||||
|
||||
return new Apache_Solr_HttpTransport_Response($statusCode, $contentType, $responseBody);
|
||||
}
|
||||
|
||||
public function performHeadRequest($url, $timeout = false)
|
||||
{
|
||||
// check the timeout value
|
||||
if ($timeout === false || $timeout <= 0.0)
|
||||
{
|
||||
// use the default timeout
|
||||
$timeout = $this->getDefaultTimeout();
|
||||
}
|
||||
|
||||
$curl = curl_init();
|
||||
|
||||
// set curl HEAD options
|
||||
curl_setopt_array($curl, array(
|
||||
// return the response body from curl_exec
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
|
||||
// get the output as binary data
|
||||
CURLOPT_BINARYTRANSFER => true,
|
||||
|
||||
// we do not need the headers in the output, we get everything we need from curl_getinfo
|
||||
CURLOPT_HEADER => false,
|
||||
|
||||
// this both sets the method to HEAD and says not to return a body
|
||||
CURLOPT_NOBODY => true,
|
||||
|
||||
// set the URL
|
||||
CURLOPT_URL => $url,
|
||||
|
||||
// set the timeout
|
||||
CURLOPT_TIMEOUT => $timeout
|
||||
));
|
||||
|
||||
// make the request
|
||||
$responseBody = curl_exec($curl);
|
||||
|
||||
// get info from the transfer
|
||||
$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
|
||||
$contentType = curl_getinfo($curl, CURLINFO_CONTENT_TYPE);
|
||||
|
||||
// close our curl session - we're done with it
|
||||
curl_close($curl);
|
||||
|
||||
return new Apache_Solr_HttpTransport_Response($statusCode, $contentType, $responseBody);
|
||||
}
|
||||
|
||||
public function performPostRequest($url, $postData, $contentType, $timeout = false)
|
||||
{
|
||||
// check the timeout value
|
||||
if ($timeout === false || $timeout <= 0.0)
|
||||
{
|
||||
// use the default timeout
|
||||
$timeout = $this->getDefaultTimeout();
|
||||
}
|
||||
|
||||
$curl = curl_init();
|
||||
|
||||
// set curl POST options
|
||||
curl_setopt_array($curl, array(
|
||||
// return the response body from curl_exec
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
|
||||
// get the output as binary data
|
||||
CURLOPT_BINARYTRANSFER => true,
|
||||
|
||||
// we do not need the headers in the output, we get everything we need from curl_getinfo
|
||||
CURLOPT_HEADER => false,
|
||||
|
||||
// make sure we're POST
|
||||
CURLOPT_POST => true,
|
||||
|
||||
// set the URL
|
||||
CURLOPT_URL => $url,
|
||||
|
||||
// set the post data
|
||||
CURLOPT_POSTFIELDS => $postData,
|
||||
|
||||
// set the content type
|
||||
CURLOPT_HTTPHEADER => array("Content-Type: {$contentType}"),
|
||||
|
||||
// set the timeout
|
||||
CURLOPT_TIMEOUT => $timeout
|
||||
));
|
||||
|
||||
// make the request
|
||||
$responseBody = curl_exec($curl);
|
||||
|
||||
// get info from the transfer
|
||||
$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
|
||||
$contentType = curl_getinfo($curl, CURLINFO_CONTENT_TYPE);
|
||||
|
||||
// close our curl session - we're done with it
|
||||
curl_close($curl);
|
||||
|
||||
return new Apache_Solr_HttpTransport_Response($statusCode, $contentType, $responseBody);
|
||||
}
|
||||
}
|
||||
216
SolrPhpClient/Apache/Solr/HttpTransport/FileGetContents.php
Normal file
216
SolrPhpClient/Apache/Solr/HttpTransport/FileGetContents.php
Normal file
@@ -0,0 +1,216 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* - Neither the name of Servigistics, Inc. nor the names of
|
||||
* its contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @copyright Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)
|
||||
* @license http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD
|
||||
* @version $Id: $
|
||||
*
|
||||
* @package Apache
|
||||
* @subpackage Solr
|
||||
* @author Donovan Jimenez <djimenez@conduit-it.com>
|
||||
*/
|
||||
|
||||
// Require Apache_Solr_HttpTransport_Abstract
|
||||
require_once(dirname(__FILE__) . '/Abstract.php');
|
||||
|
||||
/**
|
||||
* HTTP Transport implemenation that uses the builtin http URL wrappers and file_get_contents
|
||||
*/
|
||||
class Apache_Solr_HttpTransport_FileGetContents extends Apache_Solr_HttpTransport_Abstract
|
||||
{
|
||||
/**
|
||||
* SVN Revision meta data for this class
|
||||
*/
|
||||
const SVN_REVISION = '$Revision: $';
|
||||
|
||||
/**
|
||||
* SVN ID meta data for this class
|
||||
*/
|
||||
const SVN_ID = '$Id: $';
|
||||
|
||||
/**
|
||||
* Reusable stream context resources for GET and POST operations
|
||||
*
|
||||
* @var resource
|
||||
*/
|
||||
private $_getContext, $_headContext, $_postContext;
|
||||
|
||||
/**
|
||||
* Initializes our reuseable get and post stream contexts
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->_getContext = stream_context_create();
|
||||
$this->_headContext = stream_context_create();
|
||||
$this->_postContext = stream_context_create();
|
||||
}
|
||||
|
||||
public function performGetRequest($url, $timeout = false)
|
||||
{
|
||||
// set the timeout if specified
|
||||
if ($timeout !== FALSE && $timeout > 0.0)
|
||||
{
|
||||
// timeouts with file_get_contents seem to need
|
||||
// to be halved to work as expected
|
||||
$timeout = (float) $timeout / 2;
|
||||
|
||||
stream_context_set_option($this->_getContext, 'http', 'timeout', $timeout);
|
||||
}
|
||||
else
|
||||
{
|
||||
// use the default timeout pulled from default_socket_timeout otherwise
|
||||
stream_context_set_option($this->_getContext, 'http', 'timeout', $this->getDefaultTimeout());
|
||||
}
|
||||
|
||||
// $http_response_headers will be updated by the call to file_get_contents later
|
||||
// see http://us.php.net/manual/en/wrappers.http.php for documentation
|
||||
// Unfortunately, it will still create a notice in analyzers if we don't set it here
|
||||
$http_response_header = null;
|
||||
$responseBody = @file_get_contents($url, false, $this->_getContext);
|
||||
|
||||
return $this->_getResponseFromParts($responseBody, $http_response_header);
|
||||
}
|
||||
|
||||
public function performHeadRequest($url, $timeout = false)
|
||||
{
|
||||
stream_context_set_option($this->_headContext, array(
|
||||
'http' => array(
|
||||
// set HTTP method
|
||||
'method' => 'HEAD',
|
||||
|
||||
// default timeout
|
||||
'timeout' => $this->getDefaultTimeout()
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// set the timeout if specified
|
||||
if ($timeout !== FALSE && $timeout > 0.0)
|
||||
{
|
||||
// timeouts with file_get_contents seem to need
|
||||
// to be halved to work as expected
|
||||
$timeout = (float) $timeout / 2;
|
||||
|
||||
stream_context_set_option($this->_headContext, 'http', 'timeout', $timeout);
|
||||
}
|
||||
|
||||
// $http_response_headers will be updated by the call to file_get_contents later
|
||||
// see http://us.php.net/manual/en/wrappers.http.php for documentation
|
||||
// Unfortunately, it will still create a notice in analyzers if we don't set it here
|
||||
$http_response_header = null;
|
||||
$responseBody = @file_get_contents($url, false, $this->_headContext);
|
||||
|
||||
return $this->_getResponseFromParts($responseBody, $http_response_header);
|
||||
}
|
||||
|
||||
public function performPostRequest($url, $rawPost, $contentType, $timeout = false)
|
||||
{
|
||||
stream_context_set_option($this->_postContext, array(
|
||||
'http' => array(
|
||||
// set HTTP method
|
||||
'method' => 'POST',
|
||||
|
||||
// Add our posted content type
|
||||
'header' => "Content-Type: $contentType",
|
||||
|
||||
// the posted content
|
||||
'content' => $rawPost,
|
||||
|
||||
// default timeout
|
||||
'timeout' => $this->getDefaultTimeout()
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// set the timeout if specified
|
||||
if ($timeout !== FALSE && $timeout > 0.0)
|
||||
{
|
||||
// timeouts with file_get_contents seem to need
|
||||
// to be halved to work as expected
|
||||
$timeout = (float) $timeout / 2;
|
||||
|
||||
stream_context_set_option($this->_postContext, 'http', 'timeout', $timeout);
|
||||
}
|
||||
|
||||
// $http_response_header will be updated by the call to file_get_contents later
|
||||
// see http://us.php.net/manual/en/wrappers.http.php for documentation
|
||||
// Unfortunately, it will still create a notice in analyzers if we don't set it here
|
||||
$http_response_header = null;
|
||||
$responseBody = @file_get_contents($url, false, $this->_postContext);
|
||||
|
||||
// reset content of post context to reclaim memory
|
||||
stream_context_set_option($this->_postContext, 'http', 'content', '');
|
||||
|
||||
return $this->_getResponseFromParts($responseBody, $http_response_header);
|
||||
}
|
||||
|
||||
private function _getResponseFromParts($rawResponse, $httpHeaders)
|
||||
{
|
||||
//Assume 0, false as defaults
|
||||
$status = 0;
|
||||
$contentType = false;
|
||||
|
||||
//iterate through headers for real status, type, and encoding
|
||||
if (is_array($httpHeaders) && count($httpHeaders) > 0)
|
||||
{
|
||||
//look at the first headers for the HTTP status code
|
||||
//and message (errors are usually returned this way)
|
||||
//
|
||||
//HTTP 100 Continue response can also be returned before
|
||||
//the REAL status header, so we need look until we find
|
||||
//the last header starting with HTTP
|
||||
//
|
||||
//the spec: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.1
|
||||
//
|
||||
//Thanks to Daniel Andersson for pointing out this oversight
|
||||
while (isset($httpHeaders[0]) && substr($httpHeaders[0], 0, 4) == 'HTTP')
|
||||
{
|
||||
// we can do a intval on status line without the "HTTP/1.X " to get the code
|
||||
$status = intval(substr($httpHeaders[0], 9));
|
||||
|
||||
// remove this from the headers so we can check for more
|
||||
array_shift($httpHeaders);
|
||||
}
|
||||
|
||||
//Look for the Content-Type response header and determine type
|
||||
//and encoding from it (if possible - such as 'Content-Type: text/plain; charset=UTF-8')
|
||||
foreach ($httpHeaders as $header)
|
||||
{
|
||||
// look for the header that starts appropriately
|
||||
if (strncasecmp($header, 'Content-Type:', 13) == 0)
|
||||
{
|
||||
$contentType = substr($header, 13);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new Apache_Solr_HttpTransport_Response($status, $contentType, $rawResponse);
|
||||
}
|
||||
}
|
||||
94
SolrPhpClient/Apache/Solr/HttpTransport/Interface.php
Normal file
94
SolrPhpClient/Apache/Solr/HttpTransport/Interface.php
Normal file
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* - Neither the name of Servigistics, Inc. nor the names of
|
||||
* its contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @copyright Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)
|
||||
* @license http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD
|
||||
* @version $Id: $
|
||||
*
|
||||
* @package Apache
|
||||
* @subpackage Solr
|
||||
* @author Timo Schmidt <timo.schmidt@aoemedia.de>, Donovan Jimenez <djimenez@conduit-it.com>
|
||||
*/
|
||||
|
||||
// require Apache_Solr_HttpTransport_Response
|
||||
require_once(dirname(__FILE__) . '/Response.php');
|
||||
|
||||
/**
|
||||
* Interface that all Transport (HTTP Requester) implementations must implement. These
|
||||
* Implementations can then be plugged into the Service instance in order to user their
|
||||
* the desired method for making HTTP requests
|
||||
*/
|
||||
interface Apache_Solr_HttpTransport_Interface
|
||||
{
|
||||
/**
|
||||
* Get the current default timeout for all HTTP requests
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getDefaultTimeout();
|
||||
|
||||
/**
|
||||
* Set the current default timeout for all HTTP requests
|
||||
*
|
||||
* @param float $timeout
|
||||
*/
|
||||
public function setDefaultTimeout($timeout);
|
||||
|
||||
/**
|
||||
* Perform a GET HTTP operation with an optional timeout and return the response
|
||||
* contents, use getLastResponseHeaders to retrieve HTTP headers
|
||||
*
|
||||
* @param string $url
|
||||
* @param float $timeout
|
||||
* @return Apache_Solr_HttpTransport_Response HTTP response
|
||||
*/
|
||||
public function performGetRequest($url, $timeout = false);
|
||||
|
||||
/**
|
||||
* Perform a HEAD HTTP operation with an optional timeout and return the response
|
||||
* headers - NOTE: head requests have no response body
|
||||
*
|
||||
* @param string $url
|
||||
* @param float $timeout
|
||||
* @return Apache_Solr_HttpTransport_Response HTTP response
|
||||
*/
|
||||
public function performHeadRequest($url, $timeout = false);
|
||||
|
||||
/**
|
||||
* Perform a POST HTTP operation with an optional timeout and return the response
|
||||
* contents, use getLastResponseHeaders to retrieve HTTP headers
|
||||
*
|
||||
* @param string $url
|
||||
* @param string $rawPost
|
||||
* @param string $contentType
|
||||
* @param float $timeout
|
||||
* @return Apache_Solr_HttpTransport_Response HTTP response
|
||||
*/
|
||||
public function performPostRequest($url, $rawPost, $contentType, $timeout = false);
|
||||
}
|
||||
255
SolrPhpClient/Apache/Solr/HttpTransport/Response.php
Normal file
255
SolrPhpClient/Apache/Solr/HttpTransport/Response.php
Normal file
@@ -0,0 +1,255 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* - Neither the name of Servigistics, Inc. nor the names of
|
||||
* its contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @copyright Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)
|
||||
* @license http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD
|
||||
* @version $Id: $
|
||||
*
|
||||
* @package Apache
|
||||
* @subpackage Solr
|
||||
* @author Donovan Jimenez <djimenez@conduit-it.com>
|
||||
*/
|
||||
|
||||
/**
|
||||
* Represents the required pieces of an HTTP response provided by HTTP transport
|
||||
* implementations and then consumed by the Apache_Solr_Response class which provides
|
||||
* decoding
|
||||
*/
|
||||
class Apache_Solr_HttpTransport_Response
|
||||
{
|
||||
/**
|
||||
* Status Messages indexed by Status Code
|
||||
* Obtained from: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
static private $_defaultStatusMessages = array(
|
||||
// Specific to PHP Solr Client
|
||||
0 => "Communication Error",
|
||||
|
||||
// Informational 1XX
|
||||
100 => "Continue",
|
||||
101 => "Switching Protocols",
|
||||
|
||||
// Successful 2XX
|
||||
200 => "OK",
|
||||
201 => "Created",
|
||||
202 => "Accepted",
|
||||
203 => "Non-Authoritative Information",
|
||||
204 => "No Content",
|
||||
205 => "Reset Content",
|
||||
206 => "Partial Content",
|
||||
|
||||
// Redirection 3XX
|
||||
300 => "Multiple Choices",
|
||||
301 => "Moved Permanently",
|
||||
302 => "Found",
|
||||
303 => "See Other",
|
||||
304 => "Not Modified",
|
||||
305 => "Use Proxy",
|
||||
307 => "Temporary Redirect",
|
||||
|
||||
// Client Error 4XX
|
||||
400 => "Bad Request",
|
||||
401 => "Unauthorized",
|
||||
402 => "Payment Required",
|
||||
403 => "Forbidden",
|
||||
404 => "Not Found",
|
||||
405 => "Method Not Allowed",
|
||||
406 => "Not Acceptable",
|
||||
407 => "Proxy Authentication Required",
|
||||
408 => "Request Timeout",
|
||||
409 => "Conflict",
|
||||
410 => "Gone",
|
||||
411 => "Length Required",
|
||||
412 => "Precondition Failed",
|
||||
413 => "Request Entity Too Large",
|
||||
414 => "Request-URI Too Long",
|
||||
415 => "Unsupported Media Type",
|
||||
416 => "Request Range Not Satisfiable",
|
||||
417 => "Expectation Failed",
|
||||
|
||||
// Server Error 5XX
|
||||
500 => "Internal Server Error",
|
||||
501 => "Not Implemented",
|
||||
502 => "Bad Gateway",
|
||||
503 => "Service Unavailable",
|
||||
504 => "Gateway Timeout",
|
||||
505 => "HTTP Version Not Supported"
|
||||
);
|
||||
|
||||
/**
|
||||
* Get the HTTP status message based on status code
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getDefaultStatusMessage($statusCode)
|
||||
{
|
||||
$statusCode = (int) $statusCode;
|
||||
|
||||
if (isset(self::$_defaultStatusMessages[$statusCode]))
|
||||
{
|
||||
return self::$_defaultStatusMessages[$statusCode];
|
||||
}
|
||||
|
||||
return "Unknown Status";
|
||||
}
|
||||
|
||||
/**
|
||||
* The response's HTTP status code
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
private $_statusCode;
|
||||
|
||||
/**
|
||||
* The response's HTTP status message
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_statusMessage;
|
||||
|
||||
/**
|
||||
* The response's mime type
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_mimeType;
|
||||
|
||||
/**
|
||||
* The response's character encoding
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_encoding;
|
||||
|
||||
/**
|
||||
* The response's data
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_responseBody;
|
||||
|
||||
/**
|
||||
* Construct a HTTP transport response
|
||||
*
|
||||
* @param integer $statusCode The HTTP status code
|
||||
* @param string $contentType The VALUE of the Content-Type HTTP header
|
||||
* @param string $responseBody The body of the HTTP response
|
||||
*/
|
||||
public function __construct($statusCode, $contentType, $responseBody)
|
||||
{
|
||||
// set the status code, make sure its an integer
|
||||
$this->_statusCode = (int) $statusCode;
|
||||
|
||||
// lookup up status message based on code
|
||||
$this->_statusMessage = self::getDefaultStatusMessage($this->_statusCode);
|
||||
|
||||
// set the response body, it should always be a string
|
||||
$this->_responseBody = (string) $responseBody;
|
||||
|
||||
// parse the content type header value for mimetype and encoding
|
||||
// first set default values that will remain if we can't find
|
||||
// what we're looking for in the content type
|
||||
$this->_mimeType = "text/plain";
|
||||
$this->_encoding = "UTF-8";
|
||||
|
||||
if ($contentType)
|
||||
{
|
||||
// now break apart the header to see if there's character encoding
|
||||
$contentTypeParts = explode(';', $contentType, 2);
|
||||
|
||||
if (isset($contentTypeParts[0]))
|
||||
{
|
||||
$this->_mimeType = trim($contentTypeParts[0]);
|
||||
}
|
||||
|
||||
if (isset($contentTypeParts[1]))
|
||||
{
|
||||
// we have a second part, split it further
|
||||
$contentTypeParts = explode('=', $contentTypeParts[1]);
|
||||
|
||||
if (isset($contentTypeParts[1]))
|
||||
{
|
||||
$this->_encoding = trim($contentTypeParts[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the status code of the response
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getStatusCode()
|
||||
{
|
||||
return $this->_statusCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the status message of the response
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getStatusMessage()
|
||||
{
|
||||
return $this->_statusMessage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the mimetype of the response body
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMimeType()
|
||||
{
|
||||
return $this->_mimeType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the charset encoding of the response body.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getEncoding()
|
||||
{
|
||||
return $this->_encoding;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the raw response body
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBody()
|
||||
{
|
||||
return $this->_responseBody;
|
||||
}
|
||||
}
|
||||
79
SolrPhpClient/Apache/Solr/HttpTransportException.php
Normal file
79
SolrPhpClient/Apache/Solr/HttpTransportException.php
Normal file
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* - Neither the name of Servigistics, Inc. nor the names of
|
||||
* its contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @copyright Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)
|
||||
* @license http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD
|
||||
* @version $Id: HttpTransportException.php 54 2011-02-04 16:29:18Z donovan.jimenez $
|
||||
*
|
||||
* @package Apache
|
||||
* @subpackage Solr
|
||||
* @author Donovan Jimenez <djimenez@conduit-it.com>
|
||||
*/
|
||||
|
||||
class Apache_Solr_HttpTransportException extends Apache_Solr_Exception
|
||||
{
|
||||
/**
|
||||
* SVN Revision meta data for this class
|
||||
*/
|
||||
const SVN_REVISION = '$Revision: 54 $';
|
||||
|
||||
/**
|
||||
* SVN ID meta data for this class
|
||||
*/
|
||||
const SVN_ID = '$Id: HttpTransportException.php 54 2011-02-04 16:29:18Z donovan.jimenez $';
|
||||
|
||||
/**
|
||||
* Response for which exception was generated
|
||||
*
|
||||
* @var Apache_Solr_Response
|
||||
*/
|
||||
private $_response;
|
||||
|
||||
/**
|
||||
* HttpTransportException Constructor
|
||||
*
|
||||
* @param Apache_Solr_Response $response
|
||||
*/
|
||||
public function __construct(Apache_Solr_Response $response)
|
||||
{
|
||||
parent::__construct("'{$response->getHttpStatus()}' Status: {$response->getHttpStatusMessage()}", $response->getHttpStatus());
|
||||
|
||||
$this->_response = $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the response for which this exception was generated
|
||||
*
|
||||
* @return Apache_Solr_Response
|
||||
*/
|
||||
public function getResponse()
|
||||
{
|
||||
return $this->_response;
|
||||
}
|
||||
}
|
||||
50
SolrPhpClient/Apache/Solr/InvalidArgumentException.php
Normal file
50
SolrPhpClient/Apache/Solr/InvalidArgumentException.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* - Neither the name of Servigistics, Inc. nor the names of
|
||||
* its contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @copyright Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)
|
||||
* @license http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD
|
||||
* @version $Id: InvalidArgumentException.php 54 2011-02-04 16:29:18Z donovan.jimenez $
|
||||
*
|
||||
* @package Apache
|
||||
* @subpackage Solr
|
||||
* @author Donovan Jimenez <djimenez@conduit-it.com>
|
||||
*/
|
||||
|
||||
class Apache_Solr_InvalidArgumentException extends Apache_Solr_Exception
|
||||
{
|
||||
/**
|
||||
* SVN Revision meta data for this class
|
||||
*/
|
||||
const SVN_REVISION = '$Revision: 54 $';
|
||||
|
||||
/**
|
||||
* SVN ID meta data for this class
|
||||
*/
|
||||
const SVN_ID = '$Id: InvalidArgumentException.php 54 2011-02-04 16:29:18Z donovan.jimenez $';
|
||||
}
|
||||
50
SolrPhpClient/Apache/Solr/NoServiceAvailableException.php
Normal file
50
SolrPhpClient/Apache/Solr/NoServiceAvailableException.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* - Neither the name of Servigistics, Inc. nor the names of
|
||||
* its contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @copyright Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)
|
||||
* @license http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD
|
||||
* @version $Id: NoServiceAvailableException.php 54 2011-02-04 16:29:18Z donovan.jimenez $
|
||||
*
|
||||
* @package Apache
|
||||
* @subpackage Solr
|
||||
* @author Donovan Jimenez <djimenez@conduit-it.com>
|
||||
*/
|
||||
|
||||
class Apache_Solr_NoServiceAvailableException extends Apache_Solr_Exception
|
||||
{
|
||||
/**
|
||||
* SVN Revision meta data for this class
|
||||
*/
|
||||
const SVN_REVISION = '$Revision: 54 $';
|
||||
|
||||
/**
|
||||
* SVN ID meta data for this class
|
||||
*/
|
||||
const SVN_ID = '$Id: NoServiceAvailableException.php 54 2011-02-04 16:29:18Z donovan.jimenez $';
|
||||
}
|
||||
50
SolrPhpClient/Apache/Solr/ParserException.php
Normal file
50
SolrPhpClient/Apache/Solr/ParserException.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* - Neither the name of Servigistics, Inc. nor the names of
|
||||
* its contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @copyright Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)
|
||||
* @license http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD
|
||||
* @version $Id: ParserException.php 54 2011-02-04 16:29:18Z donovan.jimenez $
|
||||
*
|
||||
* @package Apache
|
||||
* @subpackage Solr
|
||||
* @author Donovan Jimenez <djimenez@conduit-it.com>
|
||||
*/
|
||||
|
||||
class Apache_Solr_ParserException extends Apache_Solr_Exception
|
||||
{
|
||||
/**
|
||||
* SVN Revision meta data for this class
|
||||
*/
|
||||
const SVN_REVISION = '$Revision: 54 $';
|
||||
|
||||
/**
|
||||
* SVN ID meta data for this class
|
||||
*/
|
||||
const SVN_ID = '$Id: ParserException.php 54 2011-02-04 16:29:18Z donovan.jimenez $';
|
||||
}
|
||||
247
SolrPhpClient/Apache/Solr/Response.php
Normal file
247
SolrPhpClient/Apache/Solr/Response.php
Normal file
@@ -0,0 +1,247 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* - Neither the name of Servigistics, Inc. nor the names of
|
||||
* its contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @copyright Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)
|
||||
* @license http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD
|
||||
* @version $Id: Response.php 54 2011-02-04 16:29:18Z donovan.jimenez $
|
||||
*
|
||||
* @package Apache
|
||||
* @subpackage Solr
|
||||
* @author Donovan Jimenez <djimenez@conduit-it.com>
|
||||
*/
|
||||
|
||||
require_once(dirname(__FILE__) . '/ParserException.php');
|
||||
|
||||
/**
|
||||
* Represents a Solr response. Parses the raw response into a set of stdClass objects
|
||||
* and associative arrays for easy access.
|
||||
*
|
||||
* Currently requires json_decode which is bundled with PHP >= 5.2.0, Alternatively can be
|
||||
* installed with PECL. Zend Framework also includes a purely PHP solution.
|
||||
*/
|
||||
class Apache_Solr_Response
|
||||
{
|
||||
/**
|
||||
* SVN Revision meta data for this class
|
||||
*/
|
||||
const SVN_REVISION = '$Revision: 54 $';
|
||||
|
||||
/**
|
||||
* SVN ID meta data for this class
|
||||
*/
|
||||
const SVN_ID = '$Id: Response.php 54 2011-02-04 16:29:18Z donovan.jimenez $';
|
||||
|
||||
/**
|
||||
* Holds the raw response used in construction
|
||||
*
|
||||
* @var Apache_Solr_HttpTransport_Response HTTP response
|
||||
*/
|
||||
protected $_response;
|
||||
|
||||
/**
|
||||
* Whether the raw response has been parsed
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
protected $_isParsed = false;
|
||||
|
||||
/**
|
||||
* Parsed representation of the data
|
||||
*
|
||||
* @var mixed
|
||||
*/
|
||||
protected $_parsedData;
|
||||
|
||||
/**
|
||||
* Data parsing flags. Determines what extra processing should be done
|
||||
* after the data is initially converted to a data structure.
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
protected $_createDocuments = true,
|
||||
$_collapseSingleValueArrays = true;
|
||||
|
||||
/**
|
||||
* Constructor. Takes the raw HTTP response body and the exploded HTTP headers
|
||||
*
|
||||
* @return Apache_Solr_HttpTransport_Response HTTP response
|
||||
* @param boolean $createDocuments Whether to convert the documents json_decoded as stdClass instances to Apache_Solr_Document instances
|
||||
* @param boolean $collapseSingleValueArrays Whether to make multivalued fields appear as single values
|
||||
*/
|
||||
public function __construct(Apache_Solr_HttpTransport_Response $response, $createDocuments = true, $collapseSingleValueArrays = true)
|
||||
{
|
||||
$this->_response = $response;
|
||||
$this->_createDocuments = (bool) $createDocuments;
|
||||
$this->_collapseSingleValueArrays = (bool) $collapseSingleValueArrays;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the HTTP status code
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getHttpStatus()
|
||||
{
|
||||
return $this->_response->getStatusCode();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the HTTP status message of the response
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getHttpStatusMessage()
|
||||
{
|
||||
return $this->_response->getStatusMessage();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get content type of this Solr response
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
return $this->_response->getMimeType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get character encoding of this response. Should usually be utf-8, but just in case
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getEncoding()
|
||||
{
|
||||
return $this->_response->getEncoding();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the raw response as it was given to this object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getRawResponse()
|
||||
{
|
||||
return $this->_response->getBody();
|
||||
}
|
||||
|
||||
/**
|
||||
* Magic get to expose the parsed data and to lazily load it
|
||||
*
|
||||
* @param string $key
|
||||
* @return mixed
|
||||
*/
|
||||
public function __get($key)
|
||||
{
|
||||
if (!$this->_isParsed)
|
||||
{
|
||||
$this->_parseData();
|
||||
$this->_isParsed = true;
|
||||
}
|
||||
|
||||
if (isset($this->_parsedData->$key))
|
||||
{
|
||||
return $this->_parsedData->$key;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Magic function for isset function on parsed data
|
||||
*
|
||||
* @param string $key
|
||||
* @return boolean
|
||||
*/
|
||||
public function __isset($key)
|
||||
{
|
||||
if (!$this->_isParsed)
|
||||
{
|
||||
$this->_parseData();
|
||||
$this->_isParsed = true;
|
||||
}
|
||||
|
||||
return isset($this->_parsedData->$key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse the raw response into the parsed_data array for access
|
||||
*
|
||||
* @throws Apache_Solr_ParserException If the data could not be parsed
|
||||
*/
|
||||
protected function _parseData()
|
||||
{
|
||||
//An alternative would be to use Zend_Json::decode(...)
|
||||
$data = json_decode($this->_response->getBody());
|
||||
|
||||
// check that we receive a valid JSON response - we should never receive a null
|
||||
if ($data === null)
|
||||
{
|
||||
throw new Apache_Solr_ParserException('Solr response does not appear to be valid JSON, please examine the raw response with getRawResponse() method');
|
||||
}
|
||||
|
||||
//if we're configured to collapse single valued arrays or to convert them to Apache_Solr_Document objects
|
||||
//and we have response documents, then try to collapse the values and / or convert them now
|
||||
if (($this->_createDocuments || $this->_collapseSingleValueArrays) && isset($data->response) && is_array($data->response->docs))
|
||||
{
|
||||
$documents = array();
|
||||
|
||||
foreach ($data->response->docs as $originalDocument)
|
||||
{
|
||||
if ($this->_createDocuments)
|
||||
{
|
||||
$document = new Apache_Solr_Document();
|
||||
}
|
||||
else
|
||||
{
|
||||
$document = $originalDocument;
|
||||
}
|
||||
|
||||
foreach ($originalDocument as $key => $value)
|
||||
{
|
||||
//If a result is an array with only a single
|
||||
//value then its nice to be able to access
|
||||
//it as if it were always a single value
|
||||
if ($this->_collapseSingleValueArrays && is_array($value) && count($value) <= 1)
|
||||
{
|
||||
$value = array_shift($value);
|
||||
}
|
||||
|
||||
$document->$key = $value;
|
||||
}
|
||||
|
||||
$documents[] = $document;
|
||||
}
|
||||
|
||||
$data->response->docs = $documents;
|
||||
}
|
||||
|
||||
$this->_parsedData = $data;
|
||||
}
|
||||
}
|
||||
1181
SolrPhpClient/Apache/Solr/Service.php
Normal file
1181
SolrPhpClient/Apache/Solr/Service.php
Normal file
File diff suppressed because it is too large
Load Diff
914
SolrPhpClient/Apache/Solr/Service/Balancer.php
Normal file
914
SolrPhpClient/Apache/Solr/Service/Balancer.php
Normal file
@@ -0,0 +1,914 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* - Neither the name of Servigistics, Inc. nor the names of
|
||||
* its contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @copyright Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)
|
||||
* @license http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD
|
||||
* @version $Id: Balancer.php 54 2011-02-04 16:29:18Z donovan.jimenez $
|
||||
*
|
||||
* @package Apache
|
||||
* @subpackage Solr
|
||||
* @author Donovan Jimenez <djimenez@conduit-it.com>, Dan Wolfe
|
||||
*/
|
||||
|
||||
// See Issue #1 (http://code.google.com/p/solr-php-client/issues/detail?id=1)
|
||||
// Doesn't follow typical include path conventions, but is more convenient for users
|
||||
require_once(dirname(dirname(__FILE__)) . '/Service.php');
|
||||
|
||||
require_once(dirname(dirname(__FILE__)) . '/NoServiceAvailableException.php');
|
||||
|
||||
/**
|
||||
* Reference Implementation for using multiple Solr services in a distribution. Functionality
|
||||
* includes:
|
||||
* routing of read / write operations
|
||||
* failover (on selection) for multiple read servers
|
||||
*/
|
||||
class Apache_Solr_Service_Balancer
|
||||
{
|
||||
/**
|
||||
* SVN Revision meta data for this class
|
||||
*/
|
||||
const SVN_REVISION = '$Revision: 54 $';
|
||||
|
||||
/**
|
||||
* SVN ID meta data for this class
|
||||
*/
|
||||
const SVN_ID = '$Id: Balancer.php 54 2011-02-04 16:29:18Z donovan.jimenez $';
|
||||
|
||||
protected $_createDocuments = true;
|
||||
|
||||
protected $_readableServices = array();
|
||||
protected $_writeableServices = array();
|
||||
|
||||
protected $_currentReadService = null;
|
||||
protected $_currentWriteService = null;
|
||||
|
||||
protected $_readPingTimeout = 2;
|
||||
protected $_writePingTimeout = 4;
|
||||
|
||||
// Configuration for server selection backoff intervals
|
||||
protected $_useBackoff = false; // Set to true to use more resillient write server selection
|
||||
protected $_backoffLimit = 600; // 10 minute default maximum
|
||||
protected $_backoffEscalation = 2.0; // Rate at which to increase backoff period
|
||||
protected $_defaultBackoff = 2.0; // Default backoff interval
|
||||
|
||||
/**
|
||||
* Escape a value for special query characters such as ':', '(', ')', '*', '?', etc.
|
||||
*
|
||||
* NOTE: inside a phrase fewer characters need escaped, use {@link Apache_Solr_Service::escapePhrase()} instead
|
||||
*
|
||||
* @param string $value
|
||||
* @return string
|
||||
*/
|
||||
static public function escape($value)
|
||||
{
|
||||
return Apache_Solr_Service::escape($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Escape a value meant to be contained in a phrase for special query characters
|
||||
*
|
||||
* @param string $value
|
||||
* @return string
|
||||
*/
|
||||
static public function escapePhrase($value)
|
||||
{
|
||||
return Apache_Solr_Service::escapePhrase($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience function for creating phrase syntax from a value
|
||||
*
|
||||
* @param string $value
|
||||
* @return string
|
||||
*/
|
||||
static public function phrase($value)
|
||||
{
|
||||
return Apache_Solr_Service::phrase($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor. Takes arrays of read and write service instances or descriptions
|
||||
*
|
||||
* @param array $readableServices
|
||||
* @param array $writeableServices
|
||||
*/
|
||||
public function __construct($readableServices = array(), $writeableServices = array())
|
||||
{
|
||||
//setup readable services
|
||||
foreach ($readableServices as $service)
|
||||
{
|
||||
$this->addReadService($service);
|
||||
}
|
||||
|
||||
//setup writeable services
|
||||
foreach ($writeableServices as $service)
|
||||
{
|
||||
$this->addWriteService($service);
|
||||
}
|
||||
}
|
||||
|
||||
public function setReadPingTimeout($timeout)
|
||||
{
|
||||
$this->_readPingTimeout = $timeout;
|
||||
}
|
||||
|
||||
public function setWritePingTimeout($timeout)
|
||||
{
|
||||
$this->_writePingTimeout = $timeout;
|
||||
}
|
||||
|
||||
public function setUseBackoff($enable)
|
||||
{
|
||||
$this->_useBackoff = $enable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a service ID
|
||||
*
|
||||
* @param string $host
|
||||
* @param integer $port
|
||||
* @param string $path
|
||||
* @return string
|
||||
*/
|
||||
protected function _getServiceId($host, $port, $path)
|
||||
{
|
||||
return $host . ':' . $port . $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a service instance or service descriptor (if it is already
|
||||
* not added)
|
||||
*
|
||||
* @param mixed $service
|
||||
*
|
||||
* @throws Apache_Solr_InvalidArgumentException If service descriptor is not valid
|
||||
*/
|
||||
public function addReadService($service)
|
||||
{
|
||||
if ($service instanceof Apache_Solr_Service)
|
||||
{
|
||||
$id = $this->_getServiceId($service->getHost(), $service->getPort(), $service->getPath());
|
||||
|
||||
$this->_readableServices[$id] = $service;
|
||||
}
|
||||
else if (is_array($service))
|
||||
{
|
||||
if (isset($service['host']) && isset($service['port']) && isset($service['path']))
|
||||
{
|
||||
$id = $this->_getServiceId((string)$service['host'], (int)$service['port'], (string)$service['path']);
|
||||
|
||||
$this->_readableServices[$id] = $service;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Apache_Solr_InvalidArgumentException('A Readable Service description array does not have all required elements of host, port, and path');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a service instance or descriptor from the available services
|
||||
*
|
||||
* @param mixed $service
|
||||
*
|
||||
* @throws Apache_Solr_InvalidArgumentException If service descriptor is not valid
|
||||
*/
|
||||
public function removeReadService($service)
|
||||
{
|
||||
$id = '';
|
||||
|
||||
if ($service instanceof Apache_Solr_Service)
|
||||
{
|
||||
$id = $this->_getServiceId($service->getHost(), $service->getPort(), $service->getPath());
|
||||
}
|
||||
else if (is_array($service))
|
||||
{
|
||||
if (isset($service['host']) && isset($service['port']) && isset($service['path']))
|
||||
{
|
||||
$id = $this->_getServiceId((string)$service['host'], (int)$service['port'], (string)$service['path']);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Apache_Solr_InvalidArgumentException('A Readable Service description array does not have all required elements of host, port, and path');
|
||||
}
|
||||
}
|
||||
else if (is_string($service))
|
||||
{
|
||||
$id = $service;
|
||||
}
|
||||
|
||||
if ($id && isset($this->_readableServices[$id]))
|
||||
{
|
||||
unset($this->_readableServices[$id]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a service instance or service descriptor (if it is already
|
||||
* not added)
|
||||
*
|
||||
* @param mixed $service
|
||||
*
|
||||
* @throws Apache_Solr_InvalidArgumentException If service descriptor is not valid
|
||||
*/
|
||||
public function addWriteService($service)
|
||||
{
|
||||
if ($service instanceof Apache_Solr_Service)
|
||||
{
|
||||
$id = $this->_getServiceId($service->getHost(), $service->getPort(), $service->getPath());
|
||||
|
||||
$this->_writeableServices[$id] = $service;
|
||||
}
|
||||
else if (is_array($service))
|
||||
{
|
||||
if (isset($service['host']) && isset($service['port']) && isset($service['path']))
|
||||
{
|
||||
$id = $this->_getServiceId((string)$service['host'], (int)$service['port'], (string)$service['path']);
|
||||
|
||||
$this->_writeableServices[$id] = $service;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Apache_Solr_InvalidArgumentException('A Writeable Service description array does not have all required elements of host, port, and path');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a service instance or descriptor from the available services
|
||||
*
|
||||
* @param mixed $service
|
||||
*
|
||||
* @throws Apache_Solr_InvalidArgumentException If service descriptor is not valid
|
||||
*/
|
||||
public function removeWriteService($service)
|
||||
{
|
||||
$id = '';
|
||||
|
||||
if ($service instanceof Apache_Solr_Service)
|
||||
{
|
||||
$id = $this->_getServiceId($service->getHost(), $service->getPort(), $service->getPath());
|
||||
}
|
||||
else if (is_array($service))
|
||||
{
|
||||
if (isset($service['host']) && isset($service['port']) && isset($service['path']))
|
||||
{
|
||||
$id = $this->_getServiceId((string)$service['host'], (int)$service['port'], (string)$service['path']);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Apache_Solr_InvalidArgumentException('A Readable Service description array does not have all required elements of host, port, and path');
|
||||
}
|
||||
}
|
||||
else if (is_string($service))
|
||||
{
|
||||
$id = $service;
|
||||
}
|
||||
|
||||
if ($id && isset($this->_writeableServices[$id]))
|
||||
{
|
||||
unset($this->_writeableServices[$id]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Iterate through available read services and select the first with a ping
|
||||
* that satisfies configured timeout restrictions (or the default)
|
||||
*
|
||||
* @return Apache_Solr_Service
|
||||
*
|
||||
* @throws Apache_Solr_NoServiceAvailableException If there are no read services that meet requirements
|
||||
*/
|
||||
protected function _selectReadService($forceSelect = false)
|
||||
{
|
||||
if (!$this->_currentReadService || !isset($this->_readableServices[$this->_currentReadService]) || $forceSelect)
|
||||
{
|
||||
if ($this->_currentReadService && isset($this->_readableServices[$this->_currentReadService]) && $forceSelect)
|
||||
{
|
||||
// we probably had a communication error, ping the current read service, remove it if it times out
|
||||
if ($this->_readableServices[$this->_currentReadService]->ping($this->_readPingTimeout) === false)
|
||||
{
|
||||
$this->removeReadService($this->_currentReadService);
|
||||
}
|
||||
}
|
||||
|
||||
if (count($this->_readableServices))
|
||||
{
|
||||
// select one of the read services at random
|
||||
$ids = array_keys($this->_readableServices);
|
||||
|
||||
$id = $ids[rand(0, count($ids) - 1)];
|
||||
$service = $this->_readableServices[$id];
|
||||
|
||||
if (is_array($service))
|
||||
{
|
||||
//convert the array definition to a client object
|
||||
$service = new Apache_Solr_Service($service['host'], $service['port'], $service['path']);
|
||||
$this->_readableServices[$id] = $service;
|
||||
}
|
||||
|
||||
$service->setCreateDocuments($this->_createDocuments);
|
||||
$this->_currentReadService = $id;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Apache_Solr_NoServiceAvailableException('No read services were available');
|
||||
}
|
||||
}
|
||||
|
||||
return $this->_readableServices[$this->_currentReadService];
|
||||
}
|
||||
|
||||
/**
|
||||
* Iterate through available write services and select the first with a ping
|
||||
* that satisfies configured timeout restrictions (or the default)
|
||||
*
|
||||
* @return Apache_Solr_Service
|
||||
*
|
||||
* @throws Apache_Solr_NoServiceAvailableException If there are no write services that meet requirements
|
||||
*/
|
||||
protected function _selectWriteService($forceSelect = false)
|
||||
{
|
||||
if($this->_useBackoff)
|
||||
{
|
||||
return $this->_selectWriteServiceSafe($forceSelect);
|
||||
}
|
||||
|
||||
if (!$this->_currentWriteService || !isset($this->_writeableServices[$this->_currentWriteService]) || $forceSelect)
|
||||
{
|
||||
if ($this->_currentWriteService && isset($this->_writeableServices[$this->_currentWriteService]) && $forceSelect)
|
||||
{
|
||||
// we probably had a communication error, ping the current read service, remove it if it times out
|
||||
if ($this->_writeableServices[$this->_currentWriteService]->ping($this->_writePingTimeout) === false)
|
||||
{
|
||||
$this->removeWriteService($this->_currentWriteService);
|
||||
}
|
||||
}
|
||||
|
||||
if (count($this->_writeableServices))
|
||||
{
|
||||
// select one of the read services at random
|
||||
$ids = array_keys($this->_writeableServices);
|
||||
|
||||
$id = $ids[rand(0, count($ids) - 1)];
|
||||
$service = $this->_writeableServices[$id];
|
||||
|
||||
if (is_array($service))
|
||||
{
|
||||
//convert the array definition to a client object
|
||||
$service = new Apache_Solr_Service($service['host'], $service['port'], $service['path']);
|
||||
$this->_writeableServices[$id] = $service;
|
||||
}
|
||||
|
||||
$this->_currentWriteService = $id;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Apache_Solr_NoServiceAvailableException('No write services were available');
|
||||
}
|
||||
}
|
||||
|
||||
return $this->_writeableServices[$this->_currentWriteService];
|
||||
}
|
||||
|
||||
/**
|
||||
* Iterate through available write services and select the first with a ping
|
||||
* that satisfies configured timeout restrictions (or the default). The
|
||||
* timeout period will increase until a connection is made or the limit is
|
||||
* reached. This will allow for increased reliability with heavily loaded
|
||||
* server(s).
|
||||
*
|
||||
* @return Apache_Solr_Service
|
||||
*
|
||||
* @throws Apache_Solr_NoServiceAvailableException If there are no write services that meet requirements
|
||||
*/
|
||||
|
||||
protected function _selectWriteServiceSafe($forceSelect = false)
|
||||
{
|
||||
if (!$this->_currentWriteService || !isset($this->_writeableServices[$this->_currentWriteService]) || $forceSelect)
|
||||
{
|
||||
if (count($this->_writeableServices))
|
||||
{
|
||||
$backoff = $this->_defaultBackoff;
|
||||
|
||||
do {
|
||||
// select one of the read services at random
|
||||
$ids = array_keys($this->_writeableServices);
|
||||
|
||||
$id = $ids[rand(0, count($ids) - 1)];
|
||||
$service = $this->_writeableServices[$id];
|
||||
|
||||
if (is_array($service))
|
||||
{
|
||||
//convert the array definition to a client object
|
||||
$service = new Apache_Solr_Service($service['host'], $service['port'], $service['path']);
|
||||
$this->_writeableServices[$id] = $service;
|
||||
}
|
||||
|
||||
$this->_currentWriteService = $id;
|
||||
|
||||
$backoff *= $this->_backoffEscalation;
|
||||
|
||||
if($backoff > $this->_backoffLimit)
|
||||
{
|
||||
throw new Apache_Solr_NoServiceAvailableException('No write services were available. All timeouts exceeded.');
|
||||
}
|
||||
|
||||
} while($this->_writeableServices[$this->_currentWriteService]->ping($backoff) === false);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Apache_Solr_NoServiceAvailableException('No write services were available');
|
||||
}
|
||||
}
|
||||
|
||||
return $this->_writeableServices[$this->_currentWriteService];
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the create documents flag. This determines whether {@link Apache_Solr_Response} objects will
|
||||
* parse the response and create {@link Apache_Solr_Document} instances in place.
|
||||
*
|
||||
* @param boolean $createDocuments
|
||||
*/
|
||||
public function setCreateDocuments($createDocuments)
|
||||
{
|
||||
$this->_createDocuments = (bool) $createDocuments;
|
||||
|
||||
// set on current read service
|
||||
if ($this->_currentReadService)
|
||||
{
|
||||
$service = $this->_selectReadService();
|
||||
$service->setCreateDocuments($createDocuments);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current state of teh create documents flag.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getCreateDocuments()
|
||||
{
|
||||
return $this->_createDocuments;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw Add Method. Takes a raw post body and sends it to the update service. Post body
|
||||
* should be a complete and well formed "add" xml document.
|
||||
*
|
||||
* @param string $rawPost
|
||||
* @return Apache_Solr_Response
|
||||
*
|
||||
* @throws Apache_Solr_HttpTransportException If an error occurs during the service call
|
||||
*/
|
||||
public function add($rawPost)
|
||||
{
|
||||
$service = $this->_selectWriteService();
|
||||
|
||||
do
|
||||
{
|
||||
try
|
||||
{
|
||||
return $service->add($rawPost);
|
||||
}
|
||||
catch (Apache_Solr_HttpTransportException $e)
|
||||
{
|
||||
if ($e->getCode() != 0) //IF NOT COMMUNICATION ERROR
|
||||
{
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
$service = $this->_selectWriteService(true);
|
||||
} while ($service);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Solr Document to the index
|
||||
*
|
||||
* @param Apache_Solr_Document $document
|
||||
* @param boolean $allowDups
|
||||
* @param boolean $overwritePending
|
||||
* @param boolean $overwriteCommitted
|
||||
* @return Apache_Solr_Response
|
||||
*
|
||||
* @throws Apache_Solr_HttpTransportException If an error occurs during the service call
|
||||
*/
|
||||
public function addDocument(Apache_Solr_Document $document, $allowDups = false, $overwritePending = true, $overwriteCommitted = true)
|
||||
{
|
||||
$service = $this->_selectWriteService();
|
||||
|
||||
do
|
||||
{
|
||||
try
|
||||
{
|
||||
return $service->addDocument($document, $allowDups, $overwritePending, $overwriteCommitted);
|
||||
}
|
||||
catch (Apache_Solr_HttpTransportException $e)
|
||||
{
|
||||
if ($e->getCode() != 0) //IF NOT COMMUNICATION ERROR
|
||||
{
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
$service = $this->_selectWriteService(true);
|
||||
} while ($service);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an array of Solr Documents to the index all at once
|
||||
*
|
||||
* @param array $documents Should be an array of Apache_Solr_Document instances
|
||||
* @param boolean $allowDups
|
||||
* @param boolean $overwritePending
|
||||
* @param boolean $overwriteCommitted
|
||||
* @return Apache_Solr_Response
|
||||
*
|
||||
* @throws Apache_Solr_HttpTransportException If an error occurs during the service call
|
||||
*/
|
||||
public function addDocuments($documents, $allowDups = false, $overwritePending = true, $overwriteCommitted = true)
|
||||
{
|
||||
$service = $this->_selectWriteService();
|
||||
|
||||
do
|
||||
{
|
||||
try
|
||||
{
|
||||
return $service->addDocuments($documents, $allowDups, $overwritePending, $overwriteCommitted);
|
||||
}
|
||||
catch (Apache_Solr_HttpTransportException $e)
|
||||
{
|
||||
if ($e->getCode() != 0) //IF NOT COMMUNICATION ERROR
|
||||
{
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
$service = $this->_selectWriteService(true);
|
||||
} while ($service);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a commit command. Will be synchronous unless both wait parameters are set
|
||||
* to false.
|
||||
*
|
||||
* @param boolean $waitFlush
|
||||
* @param boolean $waitSearcher
|
||||
* @return Apache_Solr_Response
|
||||
*
|
||||
* @throws Apache_Solr_HttpTransportException If an error occurs during the service call
|
||||
*/
|
||||
public function commit($optimize = true, $waitFlush = true, $waitSearcher = true, $timeout = 3600)
|
||||
{
|
||||
$service = $this->_selectWriteService();
|
||||
|
||||
do
|
||||
{
|
||||
try
|
||||
{
|
||||
return $service->commit($optimize, $waitFlush, $waitSearcher, $timeout);
|
||||
}
|
||||
catch (Apache_Solr_HttpTransportException $e)
|
||||
{
|
||||
if ($e->getCode() != 0) //IF NOT COMMUNICATION ERROR
|
||||
{
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
$service = $this->_selectWriteService(true);
|
||||
} while ($service);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw Delete Method. Takes a raw post body and sends it to the update service. Body should be
|
||||
* a complete and well formed "delete" xml document
|
||||
*
|
||||
* @param string $rawPost
|
||||
* @param float $timeout Maximum expected duration of the delete operation on the server (otherwise, will throw a communication exception)
|
||||
* @return Apache_Solr_Response
|
||||
*
|
||||
* @throws Apache_Solr_HttpTransportException If an error occurs during the service call
|
||||
*/
|
||||
public function delete($rawPost, $timeout = 3600)
|
||||
{
|
||||
$service = $this->_selectWriteService();
|
||||
|
||||
do
|
||||
{
|
||||
try
|
||||
{
|
||||
return $service->delete($rawPost, $timeout);
|
||||
}
|
||||
catch (Apache_Solr_HttpTransportException $e)
|
||||
{
|
||||
if ($e->getCode() != 0) //IF NOT COMMUNICATION ERROR
|
||||
{
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
$service = $this->_selectWriteService(true);
|
||||
} while ($service);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a delete document based on document ID
|
||||
*
|
||||
* @param string $id
|
||||
* @param boolean $fromPending
|
||||
* @param boolean $fromCommitted
|
||||
* @param float $timeout Maximum expected duration of the delete operation on the server (otherwise, will throw a communication exception)
|
||||
* @return Apache_Solr_Response
|
||||
*
|
||||
* @throws Apache_Solr_HttpTransportException If an error occurs during the service call
|
||||
*/
|
||||
public function deleteById($id, $fromPending = true, $fromCommitted = true, $timeout = 3600)
|
||||
{
|
||||
$service = $this->_selectWriteService();
|
||||
|
||||
do
|
||||
{
|
||||
try
|
||||
{
|
||||
return $service->deleteById($id, $fromPending, $fromCommitted, $timeout);
|
||||
}
|
||||
catch (Apache_Solr_HttpTransportException $e)
|
||||
{
|
||||
if ($e->getCode() != 0) //IF NOT COMMUNICATION ERROR
|
||||
{
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
$service = $this->_selectWriteService(true);
|
||||
} while ($service);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create and post a delete document based on multiple document IDs.
|
||||
*
|
||||
* @param array $ids Expected to be utf-8 encoded strings
|
||||
* @param boolean $fromPending
|
||||
* @param boolean $fromCommitted
|
||||
* @param float $timeout Maximum expected duration of the delete operation on the server (otherwise, will throw a communication exception)
|
||||
* @return Apache_Solr_Response
|
||||
*
|
||||
* @throws Apache_Solr_HttpTransportException If an error occurs during the service call
|
||||
*/
|
||||
public function deleteByMultipleIds($ids, $fromPending = true, $fromCommitted = true, $timeout = 3600)
|
||||
{
|
||||
$service = $this->_selectWriteService();
|
||||
|
||||
do
|
||||
{
|
||||
try
|
||||
{
|
||||
return $service->deleteByMultipleId($ids, $fromPending, $fromCommitted, $timeout);
|
||||
}
|
||||
catch (Apache_Solr_HttpTransportException $e)
|
||||
{
|
||||
if ($e->getCode() != 0) //IF NOT COMMUNICATION ERROR
|
||||
{
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
$service = $this->_selectWriteService(true);
|
||||
} while ($service);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a delete document based on a query and submit it
|
||||
*
|
||||
* @param string $rawQuery
|
||||
* @param boolean $fromPending
|
||||
* @param boolean $fromCommitted
|
||||
* @param float $timeout Maximum expected duration of the delete operation on the server (otherwise, will throw a communication exception)
|
||||
* @return Apache_Solr_Response
|
||||
*
|
||||
* @throws Apache_Solr_HttpTransportException If an error occurs during the service call
|
||||
*/
|
||||
public function deleteByQuery($rawQuery, $fromPending = true, $fromCommitted = true, $timeout = 3600)
|
||||
{
|
||||
$service = $this->_selectWriteService();
|
||||
|
||||
do
|
||||
{
|
||||
try
|
||||
{
|
||||
return $service->deleteByQuery($rawQuery, $fromPending, $fromCommitted, $timeout);
|
||||
}
|
||||
catch (Apache_Solr_HttpTransportException $e)
|
||||
{
|
||||
if ($e->getCode() != 0) //IF NOT COMMUNICATION ERROR
|
||||
{
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
$service = $this->_selectWriteService(true);
|
||||
} while ($service);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use Solr Cell to extract document contents. See {@link http://wiki.apache.org/solr/ExtractingRequestHandler} for information on how
|
||||
* to use Solr Cell and what parameters are available.
|
||||
*
|
||||
* NOTE: when passing an Apache_Solr_Document instance, field names and boosts will automatically be prepended by "literal." and "boost."
|
||||
* as appropriate. Any keys from the $params array will NOT be treated this way. Any mappings from the document will overwrite key / value
|
||||
* pairs in the params array if they have the same name (e.g. you pass a "literal.id" key and value in your $params array but you also
|
||||
* pass in a document isntance with an "id" field" - the document's value(s) will take precedence).
|
||||
*
|
||||
* @param string $file Path to file to extract data from
|
||||
* @param array $params optional array of key value pairs that will be sent with the post (see Solr Cell documentation)
|
||||
* @param Apache_Solr_Document $document optional document that will be used to generate post parameters (literal.* and boost.* params)
|
||||
* @param string $mimetype optional mimetype specification (for the file being extracted)
|
||||
*
|
||||
* @return Apache_Solr_Response
|
||||
*
|
||||
* @throws Apache_Solr_InvalidArgumentException if $file, $params, or $document are invalid.
|
||||
*/
|
||||
public function extract($file, $params = array(), $document = null, $mimetype = 'application/octet-stream')
|
||||
{
|
||||
$service = $this->_selectWriteService();
|
||||
|
||||
do
|
||||
{
|
||||
try
|
||||
{
|
||||
return $service->extract($file, $params, $document, $mimetype);
|
||||
}
|
||||
catch (Apache_Solr_HttpTransportException $e)
|
||||
{
|
||||
if ($e->getCode() != 0) //IF NOT COMMUNICATION ERROR
|
||||
{
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
$service = $this->_selectWriteService(true);
|
||||
} while ($service);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use Solr Cell to extract document contents. See {@link http://wiki.apache.org/solr/ExtractingRequestHandler} for information on how
|
||||
* to use Solr Cell and what parameters are available.
|
||||
*
|
||||
* NOTE: when passing an Apache_Solr_Document instance, field names and boosts will automatically be prepended by "literal." and "boost."
|
||||
* as appropriate. Any keys from the $params array will NOT be treated this way. Any mappings from the document will overwrite key / value
|
||||
* pairs in the params array if they have the same name (e.g. you pass a "literal.id" key and value in your $params array but you also
|
||||
* pass in a document isntance with an "id" field" - the document's value(s) will take precedence).
|
||||
*
|
||||
* @param string $data Data that will be passed to Solr Cell
|
||||
* @param array $params optional array of key value pairs that will be sent with the post (see Solr Cell documentation)
|
||||
* @param Apache_Solr_Document $document optional document that will be used to generate post parameters (literal.* and boost.* params)
|
||||
* @param string $mimetype optional mimetype specification (for the file being extracted)
|
||||
*
|
||||
* @return Apache_Solr_Response
|
||||
*
|
||||
* @throws Apache_Solr_InvalidArgumentException if $file, $params, or $document are invalid.
|
||||
*
|
||||
* @todo Should be using multipart/form-data to post parameter values, but I could not get my implementation to work. Needs revisisted.
|
||||
*/
|
||||
public function extractFromString($data, $params = array(), $document = null, $mimetype = 'application/octet-stream')
|
||||
{
|
||||
$service = $this->_selectWriteService();
|
||||
|
||||
do
|
||||
{
|
||||
try
|
||||
{
|
||||
return $service->extractFromString($data, $params, $document, $mimetype);
|
||||
}
|
||||
catch (Apache_Solr_HttpTransportException $e)
|
||||
{
|
||||
if ($e->getCode() != 0) //IF NOT COMMUNICATION ERROR
|
||||
{
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
$service = $this->_selectWriteService(true);
|
||||
} while ($service);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send an optimize command. Will be synchronous unless both wait parameters are set
|
||||
* to false.
|
||||
*
|
||||
* @param boolean $waitFlush
|
||||
* @param boolean $waitSearcher
|
||||
* @param float $timeout Maximum expected duration of the optimize operation on the server (otherwise, will throw a communication exception)
|
||||
* @return Apache_Solr_Response
|
||||
*
|
||||
* @throws Apache_Solr_HttpTransportException If an error occurs during the service call
|
||||
*/
|
||||
public function optimize($waitFlush = true, $waitSearcher = true, $timeout = 3600)
|
||||
{
|
||||
$service = $this->_selectWriteService();
|
||||
|
||||
do
|
||||
{
|
||||
try
|
||||
{
|
||||
return $service->optimize($waitFlush, $waitSearcher, $timeout);
|
||||
}
|
||||
catch (Apache_Solr_HttpTransportException $e)
|
||||
{
|
||||
if ($e->getCode() != 0) //IF NOT COMMUNICATION ERROR
|
||||
{
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
$service = $this->_selectWriteService(true);
|
||||
} while ($service);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple Search interface
|
||||
*
|
||||
* @param string $query The raw query string
|
||||
* @param int $offset The starting offset for result documents
|
||||
* @param int $limit The maximum number of result documents to return
|
||||
* @param array $params key / value pairs for query parameters, use arrays for multivalued parameters
|
||||
* @param string $method The HTTP method (Apache_Solr_Service::METHOD_GET or Apache_Solr_Service::METHOD::POST)
|
||||
* @return Apache_Solr_Response
|
||||
*
|
||||
* @throws Apache_Solr_HttpTransportException If an error occurs during the service call
|
||||
*/
|
||||
public function search($query, $offset = 0, $limit = 10, $params = array(), $method = Apache_Solr_Service::METHOD_GET)
|
||||
{
|
||||
$service = $this->_selectReadService();
|
||||
|
||||
do
|
||||
{
|
||||
try
|
||||
{
|
||||
return $service->search($query, $offset, $limit, $params, $method);
|
||||
}
|
||||
catch (Apache_Solr_HttpTransportException $e)
|
||||
{
|
||||
if ($e->getCode() != 0) //IF NOT COMMUNICATION ERROR
|
||||
{
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
$service = $this->_selectReadService(true);
|
||||
} while ($service);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
26
SolrPhpClient/COPYING
Normal file
26
SolrPhpClient/COPYING
Normal file
@@ -0,0 +1,26 @@
|
||||
Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of Servigistics, Inc. nor the names of
|
||||
its contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
342
SolrPhpClient/ChangeLog
Normal file
342
SolrPhpClient/ChangeLog
Normal file
@@ -0,0 +1,342 @@
|
||||
2011-02-08 20:38 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Service.php, tests/Apache/Solr/ServiceTest.php: See
|
||||
issue #59 - Adding service extractFromUrl method. This will use
|
||||
the configured HTTP transport to request the resource. extract
|
||||
has been modified to detect a file path that starts with http /
|
||||
https and to defer to extractFromUrl instead. Also, moved
|
||||
checking for params parameter to the top of method bodies so we
|
||||
can fail earlier rather than after we've gotten a file / url's
|
||||
content.
|
||||
|
||||
2011-02-08 19:28 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Service.php, tests/Apache/Solr/ServiceTest.php: See
|
||||
issue #43 - Changing optimize parameter of service's commit
|
||||
method to its correct name: expungeDeletes. Also harded php unit
|
||||
tests around commit.
|
||||
|
||||
thanks to Liam O'Boyle and Olivier Ricordeau for patches for this
|
||||
commit and the previous one for issue #51
|
||||
|
||||
2011-02-08 19:11 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Service.php, tests/Apache/Solr/ServiceTest.php: See
|
||||
issue #51 - adding commitWithin parameter to addDocument and
|
||||
addDocuments. Also hardened php unit tests for this functions
|
||||
|
||||
2011-02-04 16:29 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Document.php, Apache/Solr/Exception.php,
|
||||
Apache/Solr/HttpTransport/Abstract.php,
|
||||
Apache/Solr/HttpTransport/Curl.php,
|
||||
Apache/Solr/HttpTransport/CurlNoReuse.php,
|
||||
Apache/Solr/HttpTransport/FileGetContents.php,
|
||||
Apache/Solr/HttpTransport/Interface.php,
|
||||
Apache/Solr/HttpTransport/Response.php,
|
||||
Apache/Solr/HttpTransportException.php,
|
||||
Apache/Solr/InvalidArgumentException.php,
|
||||
Apache/Solr/NoServiceAvailableException.php,
|
||||
Apache/Solr/ParserException.php, Apache/Solr/Response.php,
|
||||
Apache/Solr/Service.php, Apache/Solr/Service/Balancer.php,
|
||||
COPYING, tests/Apache/Solr/DocumentTest.php,
|
||||
tests/Apache/Solr/HttpTransport/AbstractTest.php,
|
||||
tests/Apache/Solr/HttpTransport/CurlNoReuseTest.php,
|
||||
tests/Apache/Solr/HttpTransport/CurlTest.php,
|
||||
tests/Apache/Solr/HttpTransport/FileGetContentsTest.php,
|
||||
tests/Apache/Solr/HttpTransport/ResponseTest.php,
|
||||
tests/Apache/Solr/HttpTransportExceptionTest.php,
|
||||
tests/Apache/Solr/ResponseTest.php,
|
||||
tests/Apache/Solr/Service/BalancerTest.php,
|
||||
tests/Apache/Solr/ServiceAbstractTest.php,
|
||||
tests/Apache/Solr/ServiceTest.php: Updating licence and copyright
|
||||
texts in sources to reflect transition from Conduit IT to
|
||||
Servigistics
|
||||
|
||||
2010-11-02 20:16 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Service.php, Apache/Solr/Service/Balancer.php,
|
||||
tests/Apache/Solr/ServiceAbstractTest.php,
|
||||
tests/Apache/Solr/ServiceTest.php: See issue #55
|
||||
* Adding an Apache_Solr_Service::extractFromString method
|
||||
* Adding Apache_Solr_Service_Balancer::extract and
|
||||
Apache_Solr_Service_Balancer::extractFromString methods
|
||||
|
||||
2010-10-21 15:23 donovan.jimenez
|
||||
|
||||
* ., Apache/Solr/HttpTransport,
|
||||
Apache/Solr/HttpTransport/Abstract.php,
|
||||
Apache/Solr/HttpTransport/Curl.php,
|
||||
Apache/Solr/HttpTransport/CurlNoReuse.php,
|
||||
Apache/Solr/HttpTransport/FileGetContents.php,
|
||||
Apache/Solr/HttpTransport/Interface.php,
|
||||
Apache/Solr/HttpTransport/Response.php, Apache/Solr/Response.php,
|
||||
Apache/Solr/Service.php, Apache/Solr/Service/Balancer.php,
|
||||
COPYING, tests/Apache/Solr/DocumentTest.php,
|
||||
tests/Apache/Solr/HttpTransport,
|
||||
tests/Apache/Solr/HttpTransport/AbstractTest.php,
|
||||
tests/Apache/Solr/HttpTransport/CurlNoReuseTest.php,
|
||||
tests/Apache/Solr/HttpTransport/CurlTest.php,
|
||||
tests/Apache/Solr/HttpTransport/FileGetContentsTest.php,
|
||||
tests/Apache/Solr/HttpTransport/ResponseTest.php,
|
||||
tests/Apache/Solr/HttpTransportExceptionTest.php,
|
||||
tests/Apache/Solr/ResponseTest.php,
|
||||
tests/Apache/Solr/Service/BalancerTest.php,
|
||||
tests/Apache/Solr/Service/TestAll.php,
|
||||
tests/Apache/Solr/ServiceAbstractTest.php,
|
||||
tests/Apache/Solr/ServiceTest.php, tests/Apache/Solr/TestAll.php,
|
||||
tests/phpunit.bootstrap.inc, tests/phpunit.xml, tests/run.php:
|
||||
Merging the http_requests branch into trunk
|
||||
|
||||
See issue #49 - Service can now have the way it makes HTTP
|
||||
requests plugged in.
|
||||
The only requirement is that the plugin implement the new
|
||||
Apache_Solr_HttpTransport_Interface. There are initial
|
||||
implementations for using
|
||||
file_get_contents (what was used previously) and for using the
|
||||
curl module. Much
|
||||
thanks to Timo Schmidt for submitting an initial patch.
|
||||
|
||||
If the user does not specifically provide a transport interface
|
||||
instance, the
|
||||
file get contents implementation will be used by default.
|
||||
|
||||
There is a compatibility breaking change on the
|
||||
Apache_Solr_Response
|
||||
constructor. The Signature has changed.
|
||||
|
||||
The getDefaultTimeout and setDefaultTimeout methods on the
|
||||
Apache_Solr_Service
|
||||
class are now deprecated. They simple pass through to the active
|
||||
transport's
|
||||
methods of the same name, and I'd rather the user manage it
|
||||
there.
|
||||
|
||||
Additionally, I have cleaned up and expanded the existing unit
|
||||
tests - had to
|
||||
change tests related to the breaking change, and added new ones
|
||||
for the new
|
||||
classes as well as expanding existing ones. They should now all
|
||||
pass. curl tests
|
||||
should only run if the curl module is enabled. file get contents
|
||||
tests should
|
||||
only run if allow_url_fopen is enabled. transport tests do rely
|
||||
on an internet
|
||||
connection at this time.
|
||||
|
||||
2010-09-07 14:44 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Document.php: See issue #48, doing an isset check as
|
||||
part of the magic get. Return null if not.
|
||||
|
||||
2010-09-07 14:34 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Service.php: See issue #47, adding missing argument
|
||||
to getFieldBoost call in Apache_Solr_Service::extract method
|
||||
|
||||
2010-07-08 22:35 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Service.php: See issue #37 - adding a getter /
|
||||
setting for the default timeout value. Still initially populated
|
||||
with the default_socket_timeout ini setting
|
||||
|
||||
2010-07-08 22:21 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Service.php: See issue #42 - Adding missing require
|
||||
once for ParserException
|
||||
|
||||
2010-04-24 00:44 donovan.jimenez
|
||||
|
||||
* Apache/Solr/HttpTransportException.php, Apache/Solr/Service.php:
|
||||
See issue #38 - Adding support for Solr Cell (tika) extraction
|
||||
handler. Thanks to Liam O'Boyle for original patch.
|
||||
|
||||
2010-03-22 23:10 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Service.php: See Issue #39 - send charset for POST
|
||||
form encoded data so that the servlet container for solr will
|
||||
interpret data correctly (will usually default to latin1)
|
||||
|
||||
2010-03-22 23:06 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Service.php: Resolving Issue #40 - when using php
|
||||
with all error output or using a code analyzer, the
|
||||
http_response_header variable looks as though it won't be
|
||||
initialized before being used. Initializing it to null to
|
||||
alleviate the emitted warning.
|
||||
|
||||
2010-03-10 00:28 donovan.jimenez
|
||||
|
||||
* tests, tests/Apache, tests/Apache/Solr,
|
||||
tests/Apache/Solr/DocumentTest.php,
|
||||
tests/Apache/Solr/ResponseTest.php, tests/Apache/Solr/Service,
|
||||
tests/Apache/Solr/Service/BalancerTest.php,
|
||||
tests/Apache/Solr/Service/TestAll.php,
|
||||
tests/Apache/Solr/ServiceTest.php, tests/Apache/Solr/TestAll.php,
|
||||
tests/README, tests/phpunit.bootstrap.inc, tests/phpunit.xml,
|
||||
tests/run.php: Adding some very dusty unit tests. They are not
|
||||
complete, and some recent API changes may not be reflected in
|
||||
them, but they are a start.
|
||||
|
||||
2010-02-20 00:01 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Service/Balancer.php: See Issue #34 - synchronizing
|
||||
Apache_Solr_Service_Balancer public methods with changes in
|
||||
Apache_Solr_Service. Specifically, adding some missing optional
|
||||
timeout parameters and adding the new deleteByMultipleIds method
|
||||
|
||||
2010-02-19 23:47 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Response.php: See Issue #35 - implementing __isset
|
||||
magic method on Apache_Solr_Response
|
||||
|
||||
2010-02-19 23:36 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Document.php, Apache/Solr/Exception.php,
|
||||
Apache/Solr/HttpTransportException.php,
|
||||
Apache/Solr/InvalidArgumentException.php,
|
||||
Apache/Solr/NoServiceAvailableException.php,
|
||||
Apache/Solr/ParserException.php, Apache/Solr/Response.php,
|
||||
Apache/Solr/Service.php, Apache/Solr/Service/Balancer.php: See
|
||||
Issue #36 - fix usage of generic exceptions, thanks to dennis
|
||||
vierkant for the patch.
|
||||
|
||||
2009-12-10 03:51 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Service.php: Fixes issue #28 - Fixes typo in
|
||||
setNamedListTreatment function name. Thanks to alex dunae
|
||||
|
||||
2009-12-10 03:49 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Response.php: Fixes issue #27 - when parsing the JSON
|
||||
data, add a check for null so we can throw an exception if the
|
||||
response seems to be invalid. Thanks to thomas rabaix for the
|
||||
suggestion.
|
||||
|
||||
2009-11-21 02:07 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Service.php: see issue #23 - removing unused (by Sorl
|
||||
JSON writer) and incorrect (version did not track with Solr
|
||||
version) version parameter from all requests
|
||||
|
||||
2009-11-21 02:02 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Service.php: Fixes #26 - Do a php version check
|
||||
against 5.1.3 to determine whether brackets will be url encoded
|
||||
by http_build_query function. Depending on the result of the
|
||||
version check use the proper regex for fixing up the query string
|
||||
before passing it to Solr
|
||||
|
||||
2009-11-09 22:46 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Service.php: Fixes #20 - in previous fix, used
|
||||
stream_context_set_params when I should have used
|
||||
stream_context_set_option
|
||||
|
||||
2009-11-09 22:08 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Service.php: Fixes #20 - Reusing a get and post
|
||||
context for each request instead of creating a new stream context
|
||||
for each. PHP does not provide a function to delete created
|
||||
stream contexts and does not appear to clean them up when they go
|
||||
out of scope, which leads to high memory usage when many solr
|
||||
requests were issued (typically in indexing usage)
|
||||
|
||||
2009-11-09 21:32 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Service.php: Fixes #21 - Adding method to delete by
|
||||
multiple IDs. Thanks to pwolanin
|
||||
|
||||
2009-08-12 14:08 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Response.php: The split function is deprecated as of
|
||||
PHP 5.3. Furthermore, since none of my split's were using a regex
|
||||
it is better to use explode anyway. Fixes #19
|
||||
|
||||
2009-08-04 18:23 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Response.php, Apache/Solr/Service.php: Removed todo's
|
||||
about investigating Serialized PHP and PHP output writer usage.
|
||||
I've made the decision to stick to usage of JSON output writer
|
||||
until it can be proven that the other output writers are more
|
||||
stable or provide a substantially faster implementation. Closes
|
||||
issue #6
|
||||
|
||||
2009-08-04 17:53 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Document.php, Apache/Solr/Response.php,
|
||||
Apache/Solr/Service.php, Apache/Solr/Service/Balancer.php: Adding
|
||||
useful SVN metadata constants to each Apache_Solr class by svn
|
||||
keyword substitution. Fixes issue #16
|
||||
|
||||
2009-08-04 17:14 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Service.php: Fixes issue #5 - Applying patch (with
|
||||
minor changes) from mkalkbrenner to replace all control
|
||||
characters in Apache_Solr_Document keys / values with spaces to
|
||||
avoid an exception from Solr's XML Parser.
|
||||
|
||||
2009-07-20 14:14 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Service.php: See issue #14
|
||||
* adding timeout parameters to all delete functions
|
||||
|
||||
2009-05-11 14:51 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Service.php: See issue #8
|
||||
* Adding the ability to specify the HTTP method used for sending
|
||||
a search query (GET or POST)
|
||||
|
||||
2009-03-12 03:46 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Service.php: See
|
||||
http://code.google.com/p/solr-php-client/issues/detail?id=4
|
||||
* Reworking Service::ping() to just use file_get_contents URL
|
||||
wrappers like we do for other GET's and POST operations
|
||||
* Reworked Service::_sendRawGet() and Service::_sendRawPost() to
|
||||
create a new stream context each time. Used for controlled
|
||||
request timeouts, headers, and POST information
|
||||
|
||||
2009-01-29 00:49 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Document.php: See
|
||||
http://code.google.com/p/solr-php-client/issues/detail?id=2
|
||||
|
||||
Attempting to fix null vs. false boost parameter value issue by
|
||||
always casting to float value first.
|
||||
|
||||
Needs tested.
|
||||
|
||||
2009-01-28 17:11 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Service.php, Apache/Solr/Service/Balancer.php: See
|
||||
http://code.google.com/p/solr-php-client/issues/detail?id=1
|
||||
|
||||
Changed require_once statements that expected the Solr Client
|
||||
library to be on the include path into statements that use the
|
||||
__FILE__ magic constant to do them as absolute paths. This should
|
||||
get rid of the requirement for the user to change their include
|
||||
path configuration or add the library to the include path at
|
||||
runtime.
|
||||
|
||||
Provided as a convenience for the user.
|
||||
|
||||
|
||||
2009-01-22 04:01 donovan.jimenez
|
||||
|
||||
* Apache/Solr/Document.php, Apache/Solr/Response.php,
|
||||
Apache/Solr/Service.php, Apache/Solr/Service/Balancer.php,
|
||||
COPYING: Updating license to New BSD for google code hosting.
|
||||
Also updating copyright message
|
||||
|
||||
2009-01-21 23:50 donovan.jimenez
|
||||
|
||||
* Apache, Apache/Solr, Apache/Solr/Document.php,
|
||||
Apache/Solr/Response.php, Apache/Solr/Service,
|
||||
Apache/Solr/Service.php, Apache/Solr/Service/Balancer.php:
|
||||
Importing Solr PHP client from last released zip file
|
||||
|
||||
2008-11-26 00:26
|
||||
|
||||
* .: Initial directory structure.
|
||||
|
||||
901
SolrPhpClient/phpdocs/Apache/Solr/Apache_Solr_Document.html
Normal file
901
SolrPhpClient/phpdocs/Apache/Solr/Apache_Solr_Document.html
Normal file
@@ -0,0 +1,901 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Apache_Solr_Document</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Class Apache_Solr_Document</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
| <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<p class="implements">
|
||||
Implements interfaces:
|
||||
<ul>
|
||||
<li>IteratorAggregate (internal interface)</li> </ul>
|
||||
</p>
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Holds Key / Value pairs that represent a Solr Document along with any associated boost values. Field values can be accessed by direct dereferencing such as:</p>
|
||||
<p class="description"><p>$document->title = 'Something'; echo $document->title; ... </code></p><p>Additionally, the field values can be iterated with foreach</p><p><div class="src-code"><ol><li><div class="src-line"> <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$document </span><span class="src-key">as </span><span class="src-var">$fieldName </span>=> <span class="src-var">$fieldValue</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"> ...</div></li>
|
||||
<li><div class="src-line"> <span class="src-sym">}</span></div></li>
|
||||
</ol></div></p></p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_Document.php.html">/Document.php</a> (line <span class="field"><a href="../../__filesource/fsource_Apache_Solr_Document.php.html#a58">58</a></span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-const-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Class Constant Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Constants</span> (<a href="#sec-consts">details</a>)
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
|
||||
|
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="const-summary">
|
||||
<div class="const-title">
|
||||
<img src="../../media/images/Constant.png" alt=" " />
|
||||
<a href="#SVN_ID" title="details" class="const-name">SVN_ID</a> = <span class="var-type"> '$Id: Document.php 54 2011-02-04 16:29:18Z donovan.jimenez $'</span>
|
||||
|
||||
</div>
|
||||
<div class="const-title">
|
||||
<img src="../../media/images/Constant.png" alt=" " />
|
||||
<a href="#SVN_REVISION" title="details" class="const-name">SVN_REVISION</a> = <span class="var-type"> '$Revision: 54 $'</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-var-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Variable Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="var-summary">
|
||||
<div class="var-title">
|
||||
<span class="var-type">float</span>
|
||||
<a href="#$_documentBoost" title="details" class="var-name">$_documentBoost</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<span class="var-type">array</span>
|
||||
<a href="#$_fieldBoosts" title="details" class="var-name">$_fieldBoosts</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<span class="var-type">array</span>
|
||||
<a href="#$_fields" title="details" class="var-name">$_fields</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-method-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Method Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
|
||||
|
|
||||
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="method-summary">
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#addField" title="details" class="method-name">addField</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$key</span>, <span class="var-type">mixed</span> <span class="var-name">$value</span>, [<span class="var-type">mixed</span> <span class="var-name">$boost</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#clear" title="details" class="method-name">clear</a>
|
||||
()
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">mixed</span>
|
||||
<a href="#getBoost" title="details" class="method-name">getBoost</a>
|
||||
()
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">mixed</span>
|
||||
<a href="#getField" title="details" class="method-name">getField</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$key</span>)
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">float</span>
|
||||
<a href="#getFieldBoost" title="details" class="method-name">getFieldBoost</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$key</span>)
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">array</span>
|
||||
<a href="#getFieldBoosts" title="details" class="method-name">getFieldBoosts</a>
|
||||
()
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">array</span>
|
||||
<a href="#getFieldNames" title="details" class="method-name">getFieldNames</a>
|
||||
()
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">array</span>
|
||||
<a href="#getFieldValues" title="details" class="method-name">getFieldValues</a>
|
||||
()
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#getIterator" title="details" class="method-name">getIterator</a>
|
||||
()
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#setBoost" title="details" class="method-name">setBoost</a>
|
||||
(<span class="var-type">mixed</span> <span class="var-name">$boost</span>)
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#setField" title="details" class="method-name">setField</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$key</span>, <span class="var-type">mixed</span> <span class="var-name">$value</span>, [<span class="var-type">mixed</span> <span class="var-name">$boost</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#setFieldBoost" title="details" class="method-name">setFieldBoost</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$key</span>, <span class="var-type">mixed</span> <span class="var-name">$boost</span>)
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#setMultiValue" title="details" class="method-name">setMultiValue</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$key</span>, <span class="var-type">string</span> <span class="var-name">$value</span>, [<span class="var-type">mixed</span> <span class="var-name">$boost</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">mixed</span>
|
||||
<a href="#__get" title="details" class="method-name">__get</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$key</span>)
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">boolean</span>
|
||||
<a href="#__isset" title="details" class="method-name">__isset</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$key</span>)
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#__set" title="details" class="method-name">__set</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$key</span>, <span class="var-type">mixed</span> <span class="var-name">$value</span>)
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#__unset" title="details" class="method-name">__unset</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$key</span>)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-vars"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Variables</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
|
||||
|
||||
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
|
||||
<a name="var$_documentBoost" id="$_documentBoost"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="var-header">
|
||||
<span class="var-title">
|
||||
<span class="var-type">float</span>
|
||||
<span class="var-name">$_documentBoost</span>
|
||||
= <span class="var-default"> false</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Document.php.html#a75">75</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Document boost value</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> protected</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$_fieldBoosts" id="$_fieldBoosts"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="var-header">
|
||||
<span class="var-title">
|
||||
<span class="var-type">array</span>
|
||||
<span class="var-name">$_fieldBoosts</span>
|
||||
= <span class="var-default">array()</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Document.php.html#a89">89</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Document field boost values, indexed by name</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">var:</span> array of floats</li>
|
||||
<li><span class="field">access:</span> protected</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$_fields" id="$_fields"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="var-header">
|
||||
<span class="var-title">
|
||||
<span class="var-type">array</span>
|
||||
<span class="var-name">$_fields</span>
|
||||
= <span class="var-default">array()</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Document.php.html#a82">82</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Document field values, indexed by name</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> protected</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
<a name="methodaddField" id="addField"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">addField</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Document.php.html#a154">154</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Add a value to a multi-valued field</p>
|
||||
<p class="description"><p>NOTE: the solr XML format allows you to specify boosts PER value even though the underlying Lucene implementation only allows a boost per field. To remedy this, the final field boost value will be the product of all specified boosts on field values - this is similar to SolrJ's functionality.</p><p><div class="src-code"><ol><li><div class="src-line"> <span class="src-var">$doc </span>= <span class="src-key">new </span><span class="src-id"><a href="../../Apache/Solr/Apache_Solr_Document.html">Apache_Solr_Document</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"> </div></li>
|
||||
<li><div class="src-line"> <span class="src-var">$doc</span><span class="src-sym">-></span><a href="../../Apache/Solr/Apache_Solr_Document.html#methodaddField">addField</a><span class="src-sym">(</span><span class="src-str">'foo'</span><span class="src-sym">, </span><span class="src-str">'bar'</span><span class="src-sym">, </span><span class="src-num">2.0</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"> <span class="src-var">$doc</span><span class="src-sym">-></span><a href="../../Apache/Solr/Apache_Solr_Document.html#methodaddField">addField</a><span class="src-sym">(</span><span class="src-str">'foo'</span><span class="src-sym">, </span><span class="src-str">'baz'</span><span class="src-sym">, </span><span class="src-num">3.0</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"> </div></li>
|
||||
<li><div class="src-line"> <span class="src-comm">// resultant field boost will be 6!</span></div></li>
|
||||
<li><div class="src-line"> echo <span class="src-var">$doc</span><span class="src-sym">-></span><a href="../../Apache/Solr/Apache_Solr_Document.html#methodgetFieldBoost">getFieldBoost</a><span class="src-sym">(</span><span class="src-str">'foo'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
</ol></div></p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
addField
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$key</span>, <span class="var-type">mixed</span> <span class="var-name">$value</span>, [<span class="var-type">mixed</span> <span class="var-name">$boost</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$key</span> </li>
|
||||
<li>
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$value</span> </li>
|
||||
<li>
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$boost</span><span class="var-description">: Use false for default boost, else cast to float that should be > 0 or will be treated as false</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodclear" id="clear"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">clear</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Document.php.html#a94">94</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Clear all boosts and fields from this document</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
clear
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodgetBoost" id="getBoost"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">getBoost</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Document.php.html#a107">107</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Get current document boost</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> will be false for default, or else a float</li>
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">mixed</span>
|
||||
<span class="method-name">
|
||||
getBoost
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodgetField" id="getField"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">getField</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Document.php.html#a202">202</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Get field information</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> associative array of info if field exists, false otherwise</li>
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">mixed</span>
|
||||
<span class="method-name">
|
||||
getField
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$key</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$key</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodgetFieldBoost" id="getFieldBoost"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">getFieldBoost</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Document.php.html#a237">237</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Get the currently set field boost for a document field</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> currently set field boost, false if one is not set</li>
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">float</span>
|
||||
<span class="method-name">
|
||||
getFieldBoost
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$key</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$key</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodgetFieldBoosts" id="getFieldBoosts"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">getFieldBoosts</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Document.php.html#a267">267</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Return current field boosts, indexed by field name</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">array</span>
|
||||
<span class="method-name">
|
||||
getFieldBoosts
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodgetFieldNames" id="getFieldNames"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">getFieldNames</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Document.php.html#a277">277</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Get the names of all fields in this document</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">array</span>
|
||||
<span class="method-name">
|
||||
getFieldNames
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodgetFieldValues" id="getFieldValues"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">getFieldValues</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Document.php.html#a287">287</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Get the values of all fields in this document</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">array</span>
|
||||
<span class="method-name">
|
||||
getFieldValues
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodgetIterator" id="getIterator"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">getIterator</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Document.php.html#a302">302</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">IteratorAggregate implementation function. Allows usage:</p>
|
||||
<p class="description"><p><div class="src-code"><ol><li><div class="src-line"> <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$document </span><span class="src-key">as </span><span class="src-var">$key </span>=> <span class="src-var">$value</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"> ...</div></li>
|
||||
<li><div class="src-line"> <span class="src-sym">}</span></div></li>
|
||||
</ol></div></p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
getIterator
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
<hr class="separator" />
|
||||
<div class="notes">Implementation of:</div>
|
||||
<dl>
|
||||
<dt>IteratorAggregate::getIterator</dt>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
<a name="methodsetBoost" id="setBoost"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">setBoost</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Document.php.html#a117">117</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Set document boost factor</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
setBoost
|
||||
</span>
|
||||
(<span class="var-type">mixed</span> <span class="var-name">$boost</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$boost</span><span class="var-description">: Use false for default boost, else cast to float that should be > 0 or will be treated as false</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodsetField" id="setField"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">setField</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Document.php.html#a225">225</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Set a field value. Multi-valued fields should be set as arrays or instead use the addField(...) function which will automatically make sure the field is an array.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
setField
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$key</span>, <span class="var-type">mixed</span> <span class="var-name">$value</span>, [<span class="var-type">mixed</span> <span class="var-name">$boost</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$key</span> </li>
|
||||
<li>
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$value</span> </li>
|
||||
<li>
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$boost</span><span class="var-description">: Use false for default boost, else cast to float that should be > 0 or will be treated as false</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodsetFieldBoost" id="setFieldBoost"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">setFieldBoost</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Document.php.html#a248">248</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Set the field boost for a document field</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
setFieldBoost
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$key</span>, <span class="var-type">mixed</span> <span class="var-name">$boost</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$key</span><span class="var-description">: field name for the boost</span> </li>
|
||||
<li>
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$boost</span><span class="var-description">: Use false for default boost, else cast to float that should be > 0 or will be treated as false</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodsetMultiValue" id="setMultiValue"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">setMultiValue</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Document.php.html#a191">191</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Handle the array manipulation for a multi-valued field</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">deprecated:</span> Use addField(...) instead</li>
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
setMultiValue
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$key</span>, <span class="var-type">string</span> <span class="var-name">$value</span>, [<span class="var-type">mixed</span> <span class="var-name">$boost</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$key</span> </li>
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$value</span> </li>
|
||||
<li>
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$boost</span><span class="var-description">: Use false for default boost, else cast to float that should be > 0 or will be treated as false</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="method__get" id="__get"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">__get</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Document.php.html#a315">315</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Magic get for field values</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">mixed</span>
|
||||
<span class="method-name">
|
||||
__get
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$key</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$key</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="method__isset" id="__isset"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">__isset</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Document.php.html#a348">348</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Magic isset for fields values. Do not call directly. Allows usage:</p>
|
||||
<p class="description"><p><div class="src-code"><ol><li><div class="src-line"> isset<span class="src-sym">(</span><span class="src-var">$document</span><span class="src-sym">-></span><span class="src-id">some_field</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
</ol></div></p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">boolean</span>
|
||||
<span class="method-name">
|
||||
__isset
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$key</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$key</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="method__set" id="__set"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">__set</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Document.php.html#a333">333</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Magic set for field values. Multi-valued fields should be set as arrays or instead use the addField(...) function which will automatically make sure the field is an array.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
__set
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$key</span>, <span class="var-type">mixed</span> <span class="var-name">$value</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$key</span> </li>
|
||||
<li>
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$value</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="method__unset" id="__unset"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">__unset</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Document.php.html#a362">362</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Magic unset for field values. Do not call directly. Allows usage:</p>
|
||||
<p class="description"><p><div class="src-code"><ol><li><div class="src-line"> unset<span class="src-sym">(</span><span class="src-var">$document</span><span class="src-sym">-></span><span class="src-id">some_field</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
</ol></div></p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
__unset
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$key</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$key</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-consts"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Class Constants</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Constants</a> (<span class="disabled">details</span>)
|
||||
|
||||
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<a name="constSVN_ID" id="SVN_ID"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="const-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name">SVN_ID</span>
|
||||
= <span class="const-default"> '$Id: Document.php 54 2011-02-04 16:29:18Z donovan.jimenez $'</span>
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Document.php.html#a68">68</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">SVN ID meta data for this class</p>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="constSVN_REVISION" id="SVN_REVISION"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="const-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name">SVN_REVISION</span>
|
||||
= <span class="const-default"> '$Revision: 54 $'</span>
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Document.php.html#a63">63</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">SVN Revision meta data for this class</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:13 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
269
SolrPhpClient/phpdocs/Apache/Solr/Apache_Solr_Exception.html
Normal file
269
SolrPhpClient/phpdocs/Apache/Solr/Apache_Solr_Exception.html
Normal file
@@ -0,0 +1,269 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Apache_Solr_Exception</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Class Apache_Solr_Exception</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-descendents">Descendents</a>
|
||||
| <a href="#sec-vars">Vars</a>
|
||||
| <a href="#sec-methods">Methods</a>
|
||||
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Copyright (c) 2007-2011, Servigistics, Inc.</p>
|
||||
<p class="description"><p>All rights reserved.</p><p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</p><p><ul><li>Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.</li><li>Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.</li><li>Neither the name of Servigistics, Inc. nor the names of
|
||||
its contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.</li></ul> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">author:</span> Donovan Jimenez <<a href="mailto:djimenez@conduit-it.com">djimenez@conduit-it.com</a>></li>
|
||||
<li><span class="field">version:</span> $Id: Exception.php 54 2011-02-04 16:29:18Z donovan.jimenez $</li>
|
||||
<li><span class="field">copyright:</span> Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)</li>
|
||||
<li><span class="field">license:</span> <a href="http://solr-php-client.googlecode.com/svn/trunk/COPYING">New BSD</a></li>
|
||||
</ul>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_Exception.php.html">/Exception.php</a> (line <span class="field"><a href="../../__filesource/fsource_Apache_Solr_Exception.php.html#a39">39</a></span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre>Exception
|
||||
|
|
||||
--Apache_Solr_Exception</pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-descendents"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Direct descendents</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Descendents</span>
|
||||
| <a href="#sec-vars">Vars</a>
|
||||
| <a href="#sec-methods">Methods</a>
|
||||
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<table cellpadding="2" cellspacing="0" class="class-table">
|
||||
<tr>
|
||||
<th class="class-table-header">Class</th>
|
||||
<th class="class-table-header">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em"><a href="../../Apache/Solr/Apache_Solr_HttpTransportException.html">Apache_Solr_HttpTransportException</a></td>
|
||||
<td>
|
||||
Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em"><a href="../../Apache/Solr/Apache_Solr_ParserException.html">Apache_Solr_ParserException</a></td>
|
||||
<td>
|
||||
Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em"><a href="../../Apache/Solr/Apache_Solr_NoServiceAvailableException.html">Apache_Solr_NoServiceAvailableException</a></td>
|
||||
<td>
|
||||
Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em"><a href="../../Apache/Solr/Apache_Solr_InvalidArgumentException.html">Apache_Solr_InvalidArgumentException</a></td>
|
||||
<td>
|
||||
Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-const-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Class Constant Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-descendents">Descendants</a> |
|
||||
<span class="disabled">Constants</span> (<a href="#sec-consts">details</a>)
|
||||
<a href="#sec-vars">Vars</a>
|
||||
|
||||
|
|
||||
|
|
||||
<a href="#sec-methods">Methods</a>
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="const-summary">
|
||||
<div class="const-title">
|
||||
<img src="../../media/images/Constant.png" alt=" " />
|
||||
<a href="#SVN_ID" title="details" class="const-name">SVN_ID</a> = <span class="var-type"> '$Id: Exception.php 54 2011-02-04 16:29:18Z donovan.jimenez $'</span>
|
||||
|
||||
</div>
|
||||
<div class="const-title">
|
||||
<img src="../../media/images/Constant.png" alt=" " />
|
||||
<a href="#SVN_REVISION" title="details" class="const-name">SVN_REVISION</a> = <span class="var-type"> '$Revision: 54 $'</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<a name="sec-vars"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Variables</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-descendents">Descendents</a> |
|
||||
<span class="disabled">Vars</span>
|
||||
|
||||
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
|
|
||||
<a href="#sec-methods">Methods</a>
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
|
||||
<h4>Inherited Variables</h4>
|
||||
<A NAME='inherited_vars'><!-- --></A>
|
||||
<p>Inherited from <span class="classname">Exception (Internal Class)</span></p>
|
||||
<blockquote>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$code</span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$file</span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$line</span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$message</span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$previous</span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$string</span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$trace</span><br>
|
||||
</span>
|
||||
</blockquote>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-descendents">Descendents</a> |
|
||||
<a href="#sec-vars">Vars</a>
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
<span class="disabled">Methods</span>
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
<h4>Inherited Methods</h4>
|
||||
<a name='inherited_methods'><!-- --></a>
|
||||
<!-- =========== Summary =========== -->
|
||||
<p>Inherited From <span class="classname">Exception (Internal Class)</span></p>
|
||||
<blockquote>
|
||||
<span class="method-name">constructor __construct ( [$message = ], [$code = ], [$previous = ] )</span><br>
|
||||
<span class="method-name">getCode ( )</span><br>
|
||||
<span class="method-name">getFile ( )</span><br>
|
||||
<span class="method-name">getLine ( )</span><br>
|
||||
<span class="method-name">getMessage ( )</span><br>
|
||||
<span class="method-name">getPrevious ( )</span><br>
|
||||
<span class="method-name">getTrace ( )</span><br>
|
||||
<span class="method-name">getTraceAsString ( )</span><br>
|
||||
<span class="method-name">__clone ( )</span><br>
|
||||
<span class="method-name">__toString ( )</span><br>
|
||||
</blockquote>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-consts"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Class Constants</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-descendents">Descendants</a> |
|
||||
<span class="disabled">Constants</span>
|
||||
|
||||
|
||||
<a href="#sec-vars">Vars</a>
|
||||
|
|
||||
<a href="#sec-methods">Methods</a>
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<a name="constSVN_ID" id="SVN_ID"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="const-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name">SVN_ID</span>
|
||||
= <span class="const-default"> '$Id: Exception.php 54 2011-02-04 16:29:18Z donovan.jimenez $'</span>
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Exception.php.html#a49">49</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">SVN ID meta data for this class</p>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="constSVN_REVISION" id="SVN_REVISION"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="const-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name">SVN_REVISION</span>
|
||||
= <span class="const-default"> '$Revision: 54 $'</span>
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Exception.php.html#a44">44</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">SVN Revision meta data for this class</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:13 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
@@ -0,0 +1,246 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Apache_Solr_HttpTransportException</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Class Apache_Solr_HttpTransportException</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Copyright (c) 2007-2011, Servigistics, Inc.</p>
|
||||
<p class="description"><p>All rights reserved.</p><p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</p><p><ul><li>Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.</li><li>Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.</li><li>Neither the name of Servigistics, Inc. nor the names of
|
||||
its contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.</li></ul> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">author:</span> Donovan Jimenez <<a href="mailto:djimenez@conduit-it.com">djimenez@conduit-it.com</a>></li>
|
||||
<li><span class="field">version:</span> $Id: HttpTransportException.php 54 2011-02-04 16:29:18Z donovan.jimenez $</li>
|
||||
<li><span class="field">copyright:</span> Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)</li>
|
||||
<li><span class="field">license:</span> <a href="http://solr-php-client.googlecode.com/svn/trunk/COPYING">New BSD</a></li>
|
||||
</ul>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_HttpTransportException.php.html">/HttpTransportException.php</a> (line <span class="field"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportException.php.html#a39">39</a></span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre>Exception
|
||||
|
|
||||
--<a href="../../Apache/Solr/Apache_Solr_Exception.html">Apache_Solr_Exception</a>
|
||||
|
|
||||
--Apache_Solr_HttpTransportException</pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-const-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Class Constant Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Constants</span> (<a href="#sec-consts">details</a>)
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="const-summary">
|
||||
<div class="const-title">
|
||||
<img src="../../media/images/Constant.png" alt=" " />
|
||||
<a href="#SVN_ID" title="details" class="const-name">SVN_ID</a> = <span class="var-type"> '$Id: HttpTransportException.php 54 2011-02-04 16:29:18Z donovan.jimenez $'</span>
|
||||
|
||||
</div>
|
||||
<div class="const-title">
|
||||
<img src="../../media/images/Constant.png" alt=" " />
|
||||
<a href="#SVN_REVISION" title="details" class="const-name">SVN_REVISION</a> = <span class="var-type"> '$Revision: 54 $'</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-method-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Method Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="method-summary">
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">Apache_Solr_HttpTransportException</span>
|
||||
<a href="#__construct" title="details" class="method-name">__construct</a>
|
||||
(<span class="var-type"><a href="../../Apache/Solr/Apache_Solr_Response.html">Apache_Solr_Response</a></span> <span class="var-name">$response</span>)
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result"><a href="../../Apache/Solr/Apache_Solr_Response.html">Apache_Solr_Response</a></span>
|
||||
<a href="#getResponse" title="details" class="method-name">getResponse</a>
|
||||
()
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
<a name="method__construct" id="__construct"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">Constructor __construct</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportException.php.html#a63">63</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">HttpTransportException Constructor</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">Apache_Solr_HttpTransportException</span>
|
||||
<span class="method-name">
|
||||
__construct
|
||||
</span>
|
||||
(<span class="var-type"><a href="../../Apache/Solr/Apache_Solr_Response.html">Apache_Solr_Response</a></span> <span class="var-name">$response</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"><a href="../../Apache/Solr/Apache_Solr_Response.html">Apache_Solr_Response</a></span>
|
||||
<span class="var-name">$response</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodgetResponse" id="getResponse"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">getResponse</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportException.php.html#a75">75</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Get the response for which this exception was generated</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result"><a href="../../Apache/Solr/Apache_Solr_Response.html">Apache_Solr_Response</a></span>
|
||||
<span class="method-name">
|
||||
getResponse
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-consts"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Class Constants</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Constants</a> (<span class="disabled">details</span>)
|
||||
|
||||
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<a name="constSVN_ID" id="SVN_ID"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="const-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name">SVN_ID</span>
|
||||
= <span class="const-default"> '$Id: HttpTransportException.php 54 2011-02-04 16:29:18Z donovan.jimenez $'</span>
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportException.php.html#a49">49</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">SVN ID meta data for this class</p>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="constSVN_REVISION" id="SVN_REVISION"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="const-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name">SVN_REVISION</span>
|
||||
= <span class="const-default"> '$Revision: 54 $'</span>
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportException.php.html#a44">44</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">SVN Revision meta data for this class</p>
|
||||
|
||||
|
||||
</div>
|
||||
<h4>Inherited Constants</h4>
|
||||
<A NAME='inherited_vars'><!-- --></A>
|
||||
<p>Inherited from <span class="classname"><a href="../../Apache/Solr/Apache_Solr_Exception.html">Apache_Solr_Exception</a></span></p>
|
||||
<blockquote>
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name"><a href="../../Apache/Solr/Apache_Solr_Exception.html#constSVN_ID">Apache_Solr_Exception::SVN_ID</a></span><br>
|
||||
</span>
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name"><a href="../../Apache/Solr/Apache_Solr_Exception.html#constSVN_REVISION">Apache_Solr_Exception::SVN_REVISION</a></span><br>
|
||||
</span>
|
||||
</blockquote>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:14 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
@@ -0,0 +1,196 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Apache_Solr_HttpTransport_Abstract</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Class Apache_Solr_HttpTransport_Abstract</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-descendents">Descendents</a>
|
||||
| <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<p class="implements">
|
||||
Implements interfaces:
|
||||
<ul>
|
||||
<li><a href="../../Apache/Solr/Apache_Solr_HttpTransport_Interface.html">Apache_Solr_HttpTransport_Interface</a></li> </ul>
|
||||
</p>
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Convenience class that implements the transport implementation. Can be extended by</p>
|
||||
<p class="description"><p>real implementations to do some of the common book keeping</p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">abstract:</span> </li>
|
||||
</ul>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_HttpTransport---Abstract.php.html">/HttpTransport/Abstract.php</a> (line <span class="field"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportAbstract.php.html#a43">43</a></span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-descendents"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Direct descendents</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Descendents</span>
|
||||
| <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<table cellpadding="2" cellspacing="0" class="class-table">
|
||||
<tr>
|
||||
<th class="class-table-header">Class</th>
|
||||
<th class="class-table-header">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em"><a href="../../Apache/Solr/Apache_Solr_HttpTransport_FileGetContents.html">Apache_Solr_HttpTransport_FileGetContents</a></td>
|
||||
<td>
|
||||
HTTP Transport implemenation that uses the builtin http URL wrappers and file_get_contents
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em"><a href="../../Apache/Solr/Apache_Solr_HttpTransport_Curl.html">Apache_Solr_HttpTransport_Curl</a></td>
|
||||
<td>
|
||||
A Curl based HTTP transport. Uses a single curl session for all requests.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em"><a href="../../Apache/Solr/Apache_Solr_HttpTransport_CurlNoReuse.html">Apache_Solr_HttpTransport_CurlNoReuse</a></td>
|
||||
<td>
|
||||
An alternative Curl HTTP transport that opens and closes a curl session for every request. This isn't the recommended way to use curl, but some version of PHP have memory issues.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<a name="sec-method-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Method Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-descendents">Descendents</a> |
|
||||
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="method-summary">
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">float</span>
|
||||
<a href="#getDefaultTimeout" title="details" class="method-name">getDefaultTimeout</a>
|
||||
()
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#setDefaultTimeout" title="details" class="method-name">setDefaultTimeout</a>
|
||||
(<span class="var-type">float</span> <span class="var-name">$timeout</span>)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-descendents">Descendents</a> |
|
||||
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
<a name="methodgetDefaultTimeout" id="getDefaultTimeout"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">getDefaultTimeout</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportAbstract.php.html#a58">58</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Get the current default timeout setting (initially the default_socket_timeout ini setting) in seconds</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">float</span>
|
||||
<span class="method-name">
|
||||
getDefaultTimeout
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
<hr class="separator" />
|
||||
<div class="notes">Implementation of:</div>
|
||||
<dl>
|
||||
<dt><a href="../../Apache/Solr/Apache_Solr_HttpTransport_Interface.html#methodgetDefaultTimeout">Apache_Solr_HttpTransport_Interface::getDefaultTimeout()</a></dt>
|
||||
<dd>Get the current default timeout for all HTTP requests</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
<a name="methodsetDefaultTimeout" id="setDefaultTimeout"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">setDefaultTimeout</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportAbstract.php.html#a80">80</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Set the current default timeout for all HTTP requests</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
setDefaultTimeout
|
||||
</span>
|
||||
(<span class="var-type">float</span> <span class="var-name">$timeout</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">float</span>
|
||||
<span class="var-name">$timeout</span> </li>
|
||||
</ul>
|
||||
|
||||
<hr class="separator" />
|
||||
<div class="notes">Implementation of:</div>
|
||||
<dl>
|
||||
<dt><a href="../../Apache/Solr/Apache_Solr_HttpTransport_Interface.html#methodsetDefaultTimeout">Apache_Solr_HttpTransport_Interface::setDefaultTimeout()</a></dt>
|
||||
<dd>Set the current default timeout for all HTTP requests</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:08 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
@@ -0,0 +1,336 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Apache_Solr_HttpTransport_Curl</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Class Apache_Solr_HttpTransport_Curl</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">A Curl based HTTP transport. Uses a single curl session for all requests.</p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_HttpTransport---Curl.php.html">/HttpTransport/Curl.php</a> (line <span class="field"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportCurl.php.html#a45">45</a></span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre><a href="../../Apache/Solr/Apache_Solr_HttpTransport_Abstract.html">Apache_Solr_HttpTransport_Abstract</a>
|
||||
|
|
||||
--Apache_Solr_HttpTransport_Curl</pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-const-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Class Constant Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Constants</span> (<a href="#sec-consts">details</a>)
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="const-summary">
|
||||
<div class="const-title">
|
||||
<img src="../../media/images/Constant.png" alt=" " />
|
||||
<a href="#SVN_ID" title="details" class="const-name">SVN_ID</a> = <span class="var-type"> '$Id:$'</span>
|
||||
|
||||
</div>
|
||||
<div class="const-title">
|
||||
<img src="../../media/images/Constant.png" alt=" " />
|
||||
<a href="#SVN_REVISION" title="details" class="const-name">SVN_REVISION</a> = <span class="var-type"> '$Revision:$'</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-method-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Method Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="method-summary">
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">Apache_Solr_HttpTransport_Curl</span>
|
||||
<a href="#__construct" title="details" class="method-name">__construct</a>
|
||||
()
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#__destruct" title="details" class="method-name">__destruct</a>
|
||||
()
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#performGetRequest" title="details" class="method-name">performGetRequest</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$url</span>, [<span class="var-type"></span> <span class="var-name">$timeout</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#performHeadRequest" title="details" class="method-name">performHeadRequest</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$url</span>, [<span class="var-type"></span> <span class="var-name">$timeout</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#performPostRequest" title="details" class="method-name">performPostRequest</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$url</span>, <span class="var-type"></span> <span class="var-name">$postData</span>, <span class="var-type"></span> <span class="var-name">$contentType</span>, [<span class="var-type"></span> <span class="var-name">$timeout</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
<a name="method__construct" id="__construct"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">Constructor __construct</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportCurl.php.html#a67">67</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Initializes a curl session</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">Apache_Solr_HttpTransport_Curl</span>
|
||||
<span class="method-name">
|
||||
__construct
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="method__destruct" id="__destruct"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">Destructor __destruct</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportCurl.php.html#a88">88</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Closes a curl session</p>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
__destruct
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodperformGetRequest" id="performGetRequest"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">performGetRequest</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportCurl.php.html#a94">94</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
performGetRequest
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$url</span>, [<span class="var-type"></span> <span class="var-name">$timeout</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$url</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$timeout</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodperformHeadRequest" id="performHeadRequest"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">performHeadRequest</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportCurl.php.html#a128">128</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
performHeadRequest
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$url</span>, [<span class="var-type"></span> <span class="var-name">$timeout</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$url</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$timeout</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodperformPostRequest" id="performPostRequest"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">performPostRequest</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportCurl.php.html#a159">159</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
performPostRequest
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$url</span>, <span class="var-type"></span> <span class="var-name">$postData</span>, <span class="var-type"></span> <span class="var-name">$contentType</span>, [<span class="var-type"></span> <span class="var-name">$timeout</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$url</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$postData</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$contentType</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$timeout</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<h4>Inherited Methods</h4>
|
||||
<a name='inherited_methods'><!-- --></a>
|
||||
<!-- =========== Summary =========== -->
|
||||
<p>Inherited From <span class="classname"><a href="../../Apache/Solr/Apache_Solr_HttpTransport_Abstract.html">Apache_Solr_HttpTransport_Abstract</a></span></p>
|
||||
<blockquote>
|
||||
<span class="method-name"><a href="../../Apache/Solr/Apache_Solr_HttpTransport_Abstract.html#methodgetDefaultTimeout">Apache_Solr_HttpTransport_Abstract::getDefaultTimeout()</a></span><br>
|
||||
<span class="method-name"><a href="../../Apache/Solr/Apache_Solr_HttpTransport_Abstract.html#methodsetDefaultTimeout">Apache_Solr_HttpTransport_Abstract::setDefaultTimeout()</a></span><br>
|
||||
</blockquote>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-consts"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Class Constants</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Constants</a> (<span class="disabled">details</span>)
|
||||
|
||||
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<a name="constSVN_ID" id="SVN_ID"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="const-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name">SVN_ID</span>
|
||||
= <span class="const-default"> '$Id:$'</span>
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportCurl.php.html#a55">55</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">SVN ID meta data for this class</p>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="constSVN_REVISION" id="SVN_REVISION"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="const-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name">SVN_REVISION</span>
|
||||
= <span class="const-default"> '$Revision:$'</span>
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportCurl.php.html#a50">50</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">SVN Revision meta data for this class</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:12 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
@@ -0,0 +1,279 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Apache_Solr_HttpTransport_CurlNoReuse</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Class Apache_Solr_HttpTransport_CurlNoReuse</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">An alternative Curl HTTP transport that opens and closes a curl session for every request. This isn't the recommended way to use curl, but some version of PHP have memory issues.</p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_HttpTransport---CurlNoReuse.php.html">/HttpTransport/CurlNoReuse.php</a> (line <span class="field"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportCurlNoReuse.php.html#a47">47</a></span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre><a href="../../Apache/Solr/Apache_Solr_HttpTransport_Abstract.html">Apache_Solr_HttpTransport_Abstract</a>
|
||||
|
|
||||
--Apache_Solr_HttpTransport_CurlNoReuse</pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-const-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Class Constant Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Constants</span> (<a href="#sec-consts">details</a>)
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="const-summary">
|
||||
<div class="const-title">
|
||||
<img src="../../media/images/Constant.png" alt=" " />
|
||||
<a href="#SVN_ID" title="details" class="const-name">SVN_ID</a> = <span class="var-type"> '$Id:$'</span>
|
||||
|
||||
</div>
|
||||
<div class="const-title">
|
||||
<img src="../../media/images/Constant.png" alt=" " />
|
||||
<a href="#SVN_REVISION" title="details" class="const-name">SVN_REVISION</a> = <span class="var-type"> '$Revision:$'</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-method-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Method Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="method-summary">
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#performGetRequest" title="details" class="method-name">performGetRequest</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$url</span>, [<span class="var-type"></span> <span class="var-name">$timeout</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#performHeadRequest" title="details" class="method-name">performHeadRequest</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$url</span>, [<span class="var-type"></span> <span class="var-name">$timeout</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#performPostRequest" title="details" class="method-name">performPostRequest</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$url</span>, <span class="var-type"></span> <span class="var-name">$postData</span>, <span class="var-type"></span> <span class="var-name">$contentType</span>, [<span class="var-type"></span> <span class="var-name">$timeout</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
<a name="methodperformGetRequest" id="performGetRequest"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">performGetRequest</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportCurlNoReuse.php.html#a59">59</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
performGetRequest
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$url</span>, [<span class="var-type"></span> <span class="var-name">$timeout</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$url</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$timeout</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodperformHeadRequest" id="performHeadRequest"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">performHeadRequest</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportCurlNoReuse.php.html#a101">101</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
performHeadRequest
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$url</span>, [<span class="var-type"></span> <span class="var-name">$timeout</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$url</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$timeout</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodperformPostRequest" id="performPostRequest"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">performPostRequest</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportCurlNoReuse.php.html#a146">146</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
performPostRequest
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$url</span>, <span class="var-type"></span> <span class="var-name">$postData</span>, <span class="var-type"></span> <span class="var-name">$contentType</span>, [<span class="var-type"></span> <span class="var-name">$timeout</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$url</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$postData</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$contentType</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$timeout</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<h4>Inherited Methods</h4>
|
||||
<a name='inherited_methods'><!-- --></a>
|
||||
<!-- =========== Summary =========== -->
|
||||
<p>Inherited From <span class="classname"><a href="../../Apache/Solr/Apache_Solr_HttpTransport_Abstract.html">Apache_Solr_HttpTransport_Abstract</a></span></p>
|
||||
<blockquote>
|
||||
<span class="method-name"><a href="../../Apache/Solr/Apache_Solr_HttpTransport_Abstract.html#methodgetDefaultTimeout">Apache_Solr_HttpTransport_Abstract::getDefaultTimeout()</a></span><br>
|
||||
<span class="method-name"><a href="../../Apache/Solr/Apache_Solr_HttpTransport_Abstract.html#methodsetDefaultTimeout">Apache_Solr_HttpTransport_Abstract::setDefaultTimeout()</a></span><br>
|
||||
</blockquote>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-consts"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Class Constants</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Constants</a> (<span class="disabled">details</span>)
|
||||
|
||||
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<a name="constSVN_ID" id="SVN_ID"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="const-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name">SVN_ID</span>
|
||||
= <span class="const-default"> '$Id:$'</span>
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportCurlNoReuse.php.html#a57">57</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">SVN ID meta data for this class</p>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="constSVN_REVISION" id="SVN_REVISION"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="const-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name">SVN_REVISION</span>
|
||||
= <span class="const-default"> '$Revision:$'</span>
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportCurlNoReuse.php.html#a52">52</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">SVN Revision meta data for this class</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:13 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
@@ -0,0 +1,309 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Apache_Solr_HttpTransport_FileGetContents</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Class Apache_Solr_HttpTransport_FileGetContents</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">HTTP Transport implemenation that uses the builtin http URL wrappers and file_get_contents</p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_HttpTransport---FileGetContents.php.html">/HttpTransport/FileGetContents.php</a> (line <span class="field"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportFileGetContents.php.html#a45">45</a></span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre><a href="../../Apache/Solr/Apache_Solr_HttpTransport_Abstract.html">Apache_Solr_HttpTransport_Abstract</a>
|
||||
|
|
||||
--Apache_Solr_HttpTransport_FileGetContents</pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-const-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Class Constant Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Constants</span> (<a href="#sec-consts">details</a>)
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="const-summary">
|
||||
<div class="const-title">
|
||||
<img src="../../media/images/Constant.png" alt=" " />
|
||||
<a href="#SVN_ID" title="details" class="const-name">SVN_ID</a> = <span class="var-type"> '$Id: $'</span>
|
||||
|
||||
</div>
|
||||
<div class="const-title">
|
||||
<img src="../../media/images/Constant.png" alt=" " />
|
||||
<a href="#SVN_REVISION" title="details" class="const-name">SVN_REVISION</a> = <span class="var-type"> '$Revision: $'</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-method-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Method Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="method-summary">
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">Apache_Solr_HttpTransport_FileGetContents</span>
|
||||
<a href="#__construct" title="details" class="method-name">__construct</a>
|
||||
()
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#performGetRequest" title="details" class="method-name">performGetRequest</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$url</span>, [<span class="var-type"></span> <span class="var-name">$timeout</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#performHeadRequest" title="details" class="method-name">performHeadRequest</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$url</span>, [<span class="var-type"></span> <span class="var-name">$timeout</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#performPostRequest" title="details" class="method-name">performPostRequest</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$url</span>, <span class="var-type"></span> <span class="var-name">$rawPost</span>, <span class="var-type"></span> <span class="var-name">$contentType</span>, [<span class="var-type"></span> <span class="var-name">$timeout</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
<a name="method__construct" id="__construct"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">Constructor __construct</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportFileGetContents.php.html#a67">67</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Initializes our reuseable get and post stream contexts</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">Apache_Solr_HttpTransport_FileGetContents</span>
|
||||
<span class="method-name">
|
||||
__construct
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodperformGetRequest" id="performGetRequest"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">performGetRequest</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportFileGetContents.php.html#a74">74</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
performGetRequest
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$url</span>, [<span class="var-type"></span> <span class="var-name">$timeout</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$url</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$timeout</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodperformHeadRequest" id="performHeadRequest"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">performHeadRequest</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportFileGetContents.php.html#a100">100</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
performHeadRequest
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$url</span>, [<span class="var-type"></span> <span class="var-name">$timeout</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$url</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$timeout</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodperformPostRequest" id="performPostRequest"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">performPostRequest</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportFileGetContents.php.html#a132">132</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
performPostRequest
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$url</span>, <span class="var-type"></span> <span class="var-name">$rawPost</span>, <span class="var-type"></span> <span class="var-name">$contentType</span>, [<span class="var-type"></span> <span class="var-name">$timeout</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$url</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$rawPost</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$contentType</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$timeout</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<h4>Inherited Methods</h4>
|
||||
<a name='inherited_methods'><!-- --></a>
|
||||
<!-- =========== Summary =========== -->
|
||||
<p>Inherited From <span class="classname"><a href="../../Apache/Solr/Apache_Solr_HttpTransport_Abstract.html">Apache_Solr_HttpTransport_Abstract</a></span></p>
|
||||
<blockquote>
|
||||
<span class="method-name"><a href="../../Apache/Solr/Apache_Solr_HttpTransport_Abstract.html#methodgetDefaultTimeout">Apache_Solr_HttpTransport_Abstract::getDefaultTimeout()</a></span><br>
|
||||
<span class="method-name"><a href="../../Apache/Solr/Apache_Solr_HttpTransport_Abstract.html#methodsetDefaultTimeout">Apache_Solr_HttpTransport_Abstract::setDefaultTimeout()</a></span><br>
|
||||
</blockquote>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-consts"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Class Constants</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Constants</a> (<span class="disabled">details</span>)
|
||||
|
||||
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<a name="constSVN_ID" id="SVN_ID"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="const-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name">SVN_ID</span>
|
||||
= <span class="const-default"> '$Id: $'</span>
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportFileGetContents.php.html#a55">55</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">SVN ID meta data for this class</p>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="constSVN_REVISION" id="SVN_REVISION"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="const-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name">SVN_REVISION</span>
|
||||
= <span class="const-default"> '$Revision: $'</span>
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportFileGetContents.php.html#a50">50</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">SVN Revision meta data for this class</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:14 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
@@ -0,0 +1,260 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Apache_Solr_HttpTransport_Interface</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Interface Apache_Solr_HttpTransport_Interface</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Interface that all Transport (HTTP Requester) implementations must implement. These</p>
|
||||
<p class="description"><p>Implementations can then be plugged into the Service instance in order to user their the desired method for making HTTP requests</p></p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_HttpTransport---Interface.php.html">/HttpTransport/Interface.php</a> (line <span class="field"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportInterface.php.html#a47">47</a></span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="sec-method-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Method Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="method-summary">
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">float</span>
|
||||
<a href="#getDefaultTimeout" title="details" class="method-name">getDefaultTimeout</a>
|
||||
()
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result"><a href="../../Apache/Solr/Apache_Solr_HttpTransport_Response.html">Apache_Solr_HttpTransport_Response</a></span>
|
||||
<a href="#performGetRequest" title="details" class="method-name">performGetRequest</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$url</span>, [<span class="var-type">float</span> <span class="var-name">$timeout</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result"><a href="../../Apache/Solr/Apache_Solr_HttpTransport_Response.html">Apache_Solr_HttpTransport_Response</a></span>
|
||||
<a href="#performHeadRequest" title="details" class="method-name">performHeadRequest</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$url</span>, [<span class="var-type">float</span> <span class="var-name">$timeout</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result"><a href="../../Apache/Solr/Apache_Solr_HttpTransport_Response.html">Apache_Solr_HttpTransport_Response</a></span>
|
||||
<a href="#performPostRequest" title="details" class="method-name">performPostRequest</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$url</span>, <span class="var-type">string</span> <span class="var-name">$rawPost</span>, <span class="var-type">string</span> <span class="var-name">$contentType</span>, [<span class="var-type">float</span> <span class="var-name">$timeout</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#setDefaultTimeout" title="details" class="method-name">setDefaultTimeout</a>
|
||||
(<span class="var-type">float</span> <span class="var-name">$timeout</span>)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
<a name="methodgetDefaultTimeout" id="getDefaultTimeout"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">getDefaultTimeout</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportInterface.php.html#a54">54</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Get the current default timeout for all HTTP requests</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">float</span>
|
||||
<span class="method-name">
|
||||
getDefaultTimeout
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodperformGetRequest" id="performGetRequest"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">performGetRequest</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportInterface.php.html#a71">71</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Perform a GET HTTP operation with an optional timeout and return the response contents, use getLastResponseHeaders to retrieve HTTP headers</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> HTTP response</li>
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result"><a href="../../Apache/Solr/Apache_Solr_HttpTransport_Response.html">Apache_Solr_HttpTransport_Response</a></span>
|
||||
<span class="method-name">
|
||||
performGetRequest
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$url</span>, [<span class="var-type">float</span> <span class="var-name">$timeout</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$url</span> </li>
|
||||
<li>
|
||||
<span class="var-type">float</span>
|
||||
<span class="var-name">$timeout</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodperformHeadRequest" id="performHeadRequest"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">performHeadRequest</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportInterface.php.html#a81">81</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Perform a HEAD HTTP operation with an optional timeout and return the response headers - NOTE: head requests have no response body</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> HTTP response</li>
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result"><a href="../../Apache/Solr/Apache_Solr_HttpTransport_Response.html">Apache_Solr_HttpTransport_Response</a></span>
|
||||
<span class="method-name">
|
||||
performHeadRequest
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$url</span>, [<span class="var-type">float</span> <span class="var-name">$timeout</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$url</span> </li>
|
||||
<li>
|
||||
<span class="var-type">float</span>
|
||||
<span class="var-name">$timeout</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodperformPostRequest" id="performPostRequest"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">performPostRequest</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportInterface.php.html#a93">93</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Perform a POST HTTP operation with an optional timeout and return the response contents, use getLastResponseHeaders to retrieve HTTP headers</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> HTTP response</li>
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result"><a href="../../Apache/Solr/Apache_Solr_HttpTransport_Response.html">Apache_Solr_HttpTransport_Response</a></span>
|
||||
<span class="method-name">
|
||||
performPostRequest
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$url</span>, <span class="var-type">string</span> <span class="var-name">$rawPost</span>, <span class="var-type">string</span> <span class="var-name">$contentType</span>, [<span class="var-type">float</span> <span class="var-name">$timeout</span> = <span class="var-default">false</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$url</span> </li>
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$rawPost</span> </li>
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$contentType</span> </li>
|
||||
<li>
|
||||
<span class="var-type">float</span>
|
||||
<span class="var-name">$timeout</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodsetDefaultTimeout" id="setDefaultTimeout"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">setDefaultTimeout</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportInterface.php.html#a61">61</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Set the current default timeout for all HTTP requests</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
setDefaultTimeout
|
||||
</span>
|
||||
(<span class="var-type">float</span> <span class="var-name">$timeout</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">float</span>
|
||||
<span class="var-name">$timeout</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:15 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
@@ -0,0 +1,298 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Apache_Solr_HttpTransport_Response</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Class Apache_Solr_HttpTransport_Response</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Represents the required pieces of an HTTP response provided by HTTP transport</p>
|
||||
<p class="description"><p>implementations and then consumed by the Apache_Solr_Response class which provides decoding</p></p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_HttpTransport---Response.php.html">/HttpTransport/Response.php</a> (line <span class="field"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportResponse.php.html#a44">44</a></span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="sec-method-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Method Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="method-summary">
|
||||
|
||||
<div class="method-definition">
|
||||
static <span class="method-result">string</span>
|
||||
<a href="#getDefaultStatusMessage" title="details" class="method-name">getDefaultStatusMessage</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$statusCode</span>)
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">Apache_Solr_HttpTransport_Response</span>
|
||||
<a href="#__construct" title="details" class="method-name">__construct</a>
|
||||
(<span class="var-type">integer</span> <span class="var-name">$statusCode</span>, <span class="var-type">string</span> <span class="var-name">$contentType</span>, <span class="var-type">string</span> <span class="var-name">$responseBody</span>)
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">string</span>
|
||||
<a href="#getBody" title="details" class="method-name">getBody</a>
|
||||
()
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">string</span>
|
||||
<a href="#getEncoding" title="details" class="method-name">getEncoding</a>
|
||||
()
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">string</span>
|
||||
<a href="#getMimeType" title="details" class="method-name">getMimeType</a>
|
||||
()
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">integer</span>
|
||||
<a href="#getStatusCode" title="details" class="method-name">getStatusCode</a>
|
||||
()
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">string</span>
|
||||
<a href="#getStatusMessage" title="details" class="method-name">getStatusMessage</a>
|
||||
()
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
<a name="methodgetDefaultStatusMessage" id="getDefaultStatusMessage"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">static getDefaultStatusMessage</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportResponse.php.html#a112">112</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Get the HTTP status message based on status code</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
static <span class="method-result">string</span>
|
||||
<span class="method-name">
|
||||
getDefaultStatusMessage
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$statusCode</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$statusCode</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="method__construct" id="__construct"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">Constructor __construct</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportResponse.php.html#a166">166</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Construct a HTTP transport response</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">Apache_Solr_HttpTransport_Response</span>
|
||||
<span class="method-name">
|
||||
__construct
|
||||
</span>
|
||||
(<span class="var-type">integer</span> <span class="var-name">$statusCode</span>, <span class="var-type">string</span> <span class="var-name">$contentType</span>, <span class="var-type">string</span> <span class="var-name">$responseBody</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">integer</span>
|
||||
<span class="var-name">$statusCode</span><span class="var-description">: The HTTP status code</span> </li>
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$contentType</span><span class="var-description">: The VALUE of the Content-Type HTTP header</span> </li>
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$responseBody</span><span class="var-description">: The body of the HTTP response</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodgetBody" id="getBody"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">getBody</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportResponse.php.html#a251">251</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Get the raw response body</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">string</span>
|
||||
<span class="method-name">
|
||||
getBody
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodgetEncoding" id="getEncoding"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">getEncoding</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportResponse.php.html#a241">241</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Get the charset encoding of the response body.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">string</span>
|
||||
<span class="method-name">
|
||||
getEncoding
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodgetMimeType" id="getMimeType"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">getMimeType</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportResponse.php.html#a231">231</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Get the mimetype of the response body</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">string</span>
|
||||
<span class="method-name">
|
||||
getMimeType
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodgetStatusCode" id="getStatusCode"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">getStatusCode</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportResponse.php.html#a211">211</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Get the status code of the response</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">integer</span>
|
||||
<span class="method-name">
|
||||
getStatusCode
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodgetStatusMessage" id="getStatusMessage"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">getStatusMessage</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportResponse.php.html#a221">221</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Get the status message of the response</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">string</span>
|
||||
<span class="method-name">
|
||||
getStatusMessage
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:16 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
@@ -0,0 +1,144 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Apache_Solr_InvalidArgumentException</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Class Apache_Solr_InvalidArgumentException</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Copyright (c) 2007-2011, Servigistics, Inc.</p>
|
||||
<p class="description"><p>All rights reserved.</p><p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</p><p><ul><li>Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.</li><li>Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.</li><li>Neither the name of Servigistics, Inc. nor the names of
|
||||
its contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.</li></ul> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">author:</span> Donovan Jimenez <<a href="mailto:djimenez@conduit-it.com">djimenez@conduit-it.com</a>></li>
|
||||
<li><span class="field">version:</span> $Id: InvalidArgumentException.php 54 2011-02-04 16:29:18Z donovan.jimenez $</li>
|
||||
<li><span class="field">copyright:</span> Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)</li>
|
||||
<li><span class="field">license:</span> <a href="http://solr-php-client.googlecode.com/svn/trunk/COPYING">New BSD</a></li>
|
||||
</ul>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_InvalidArgumentException.php.html">/InvalidArgumentException.php</a> (line <span class="field"><a href="../../__filesource/fsource_Apache_Solr_InvalidArgumentException.php.html#a39">39</a></span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre>Exception
|
||||
|
|
||||
--<a href="../../Apache/Solr/Apache_Solr_Exception.html">Apache_Solr_Exception</a>
|
||||
|
|
||||
--Apache_Solr_InvalidArgumentException</pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-const-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Class Constant Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Constants</span> (<a href="#sec-consts">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="const-summary">
|
||||
<div class="const-title">
|
||||
<img src="../../media/images/Constant.png" alt=" " />
|
||||
<a href="#SVN_ID" title="details" class="const-name">SVN_ID</a> = <span class="var-type"> '$Id: InvalidArgumentException.php 54 2011-02-04 16:29:18Z donovan.jimenez $'</span>
|
||||
|
||||
</div>
|
||||
<div class="const-title">
|
||||
<img src="../../media/images/Constant.png" alt=" " />
|
||||
<a href="#SVN_REVISION" title="details" class="const-name">SVN_REVISION</a> = <span class="var-type"> '$Revision: 54 $'</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="sec-consts"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Class Constants</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Constants</span>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<a name="constSVN_ID" id="SVN_ID"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="const-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name">SVN_ID</span>
|
||||
= <span class="const-default"> '$Id: InvalidArgumentException.php 54 2011-02-04 16:29:18Z donovan.jimenez $'</span>
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_InvalidArgumentException.php.html#a49">49</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">SVN ID meta data for this class</p>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="constSVN_REVISION" id="SVN_REVISION"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="const-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name">SVN_REVISION</span>
|
||||
= <span class="const-default"> '$Revision: 54 $'</span>
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_InvalidArgumentException.php.html#a44">44</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">SVN Revision meta data for this class</p>
|
||||
|
||||
|
||||
</div>
|
||||
<h4>Inherited Constants</h4>
|
||||
<A NAME='inherited_vars'><!-- --></A>
|
||||
<p>Inherited from <span class="classname"><a href="../../Apache/Solr/Apache_Solr_Exception.html">Apache_Solr_Exception</a></span></p>
|
||||
<blockquote>
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name"><a href="../../Apache/Solr/Apache_Solr_Exception.html#constSVN_ID">Apache_Solr_Exception::SVN_ID</a></span><br>
|
||||
</span>
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name"><a href="../../Apache/Solr/Apache_Solr_Exception.html#constSVN_REVISION">Apache_Solr_Exception::SVN_REVISION</a></span><br>
|
||||
</span>
|
||||
</blockquote>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:15 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
@@ -0,0 +1,144 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Apache_Solr_NoServiceAvailableException</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Class Apache_Solr_NoServiceAvailableException</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Copyright (c) 2007-2011, Servigistics, Inc.</p>
|
||||
<p class="description"><p>All rights reserved.</p><p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</p><p><ul><li>Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.</li><li>Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.</li><li>Neither the name of Servigistics, Inc. nor the names of
|
||||
its contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.</li></ul> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">author:</span> Donovan Jimenez <<a href="mailto:djimenez@conduit-it.com">djimenez@conduit-it.com</a>></li>
|
||||
<li><span class="field">version:</span> $Id: NoServiceAvailableException.php 54 2011-02-04 16:29:18Z donovan.jimenez $</li>
|
||||
<li><span class="field">copyright:</span> Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)</li>
|
||||
<li><span class="field">license:</span> <a href="http://solr-php-client.googlecode.com/svn/trunk/COPYING">New BSD</a></li>
|
||||
</ul>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_NoServiceAvailableException.php.html">/NoServiceAvailableException.php</a> (line <span class="field"><a href="../../__filesource/fsource_Apache_Solr_NoServiceAvailableException.php.html#a39">39</a></span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre>Exception
|
||||
|
|
||||
--<a href="../../Apache/Solr/Apache_Solr_Exception.html">Apache_Solr_Exception</a>
|
||||
|
|
||||
--Apache_Solr_NoServiceAvailableException</pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-const-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Class Constant Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Constants</span> (<a href="#sec-consts">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="const-summary">
|
||||
<div class="const-title">
|
||||
<img src="../../media/images/Constant.png" alt=" " />
|
||||
<a href="#SVN_ID" title="details" class="const-name">SVN_ID</a> = <span class="var-type"> '$Id: NoServiceAvailableException.php 54 2011-02-04 16:29:18Z donovan.jimenez $'</span>
|
||||
|
||||
</div>
|
||||
<div class="const-title">
|
||||
<img src="../../media/images/Constant.png" alt=" " />
|
||||
<a href="#SVN_REVISION" title="details" class="const-name">SVN_REVISION</a> = <span class="var-type"> '$Revision: 54 $'</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="sec-consts"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Class Constants</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Constants</span>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<a name="constSVN_ID" id="SVN_ID"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="const-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name">SVN_ID</span>
|
||||
= <span class="const-default"> '$Id: NoServiceAvailableException.php 54 2011-02-04 16:29:18Z donovan.jimenez $'</span>
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_NoServiceAvailableException.php.html#a49">49</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">SVN ID meta data for this class</p>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="constSVN_REVISION" id="SVN_REVISION"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="const-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name">SVN_REVISION</span>
|
||||
= <span class="const-default"> '$Revision: 54 $'</span>
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_NoServiceAvailableException.php.html#a44">44</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">SVN Revision meta data for this class</p>
|
||||
|
||||
|
||||
</div>
|
||||
<h4>Inherited Constants</h4>
|
||||
<A NAME='inherited_vars'><!-- --></A>
|
||||
<p>Inherited from <span class="classname"><a href="../../Apache/Solr/Apache_Solr_Exception.html">Apache_Solr_Exception</a></span></p>
|
||||
<blockquote>
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name"><a href="../../Apache/Solr/Apache_Solr_Exception.html#constSVN_ID">Apache_Solr_Exception::SVN_ID</a></span><br>
|
||||
</span>
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name"><a href="../../Apache/Solr/Apache_Solr_Exception.html#constSVN_REVISION">Apache_Solr_Exception::SVN_REVISION</a></span><br>
|
||||
</span>
|
||||
</blockquote>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:15 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
@@ -0,0 +1,144 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Apache_Solr_ParserException</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Class Apache_Solr_ParserException</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Copyright (c) 2007-2011, Servigistics, Inc.</p>
|
||||
<p class="description"><p>All rights reserved.</p><p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</p><p><ul><li>Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.</li><li>Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.</li><li>Neither the name of Servigistics, Inc. nor the names of
|
||||
its contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.</li></ul> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">author:</span> Donovan Jimenez <<a href="mailto:djimenez@conduit-it.com">djimenez@conduit-it.com</a>></li>
|
||||
<li><span class="field">version:</span> $Id: ParserException.php 54 2011-02-04 16:29:18Z donovan.jimenez $</li>
|
||||
<li><span class="field">copyright:</span> Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)</li>
|
||||
<li><span class="field">license:</span> <a href="http://solr-php-client.googlecode.com/svn/trunk/COPYING">New BSD</a></li>
|
||||
</ul>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_ParserException.php.html">/ParserException.php</a> (line <span class="field"><a href="../../__filesource/fsource_Apache_Solr_ParserException.php.html#a39">39</a></span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre>Exception
|
||||
|
|
||||
--<a href="../../Apache/Solr/Apache_Solr_Exception.html">Apache_Solr_Exception</a>
|
||||
|
|
||||
--Apache_Solr_ParserException</pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-const-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Class Constant Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Constants</span> (<a href="#sec-consts">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="const-summary">
|
||||
<div class="const-title">
|
||||
<img src="../../media/images/Constant.png" alt=" " />
|
||||
<a href="#SVN_ID" title="details" class="const-name">SVN_ID</a> = <span class="var-type"> '$Id: ParserException.php 54 2011-02-04 16:29:18Z donovan.jimenez $'</span>
|
||||
|
||||
</div>
|
||||
<div class="const-title">
|
||||
<img src="../../media/images/Constant.png" alt=" " />
|
||||
<a href="#SVN_REVISION" title="details" class="const-name">SVN_REVISION</a> = <span class="var-type"> '$Revision: 54 $'</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="sec-consts"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Class Constants</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Constants</span>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<a name="constSVN_ID" id="SVN_ID"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="const-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name">SVN_ID</span>
|
||||
= <span class="const-default"> '$Id: ParserException.php 54 2011-02-04 16:29:18Z donovan.jimenez $'</span>
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_ParserException.php.html#a49">49</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">SVN ID meta data for this class</p>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="constSVN_REVISION" id="SVN_REVISION"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="const-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name">SVN_REVISION</span>
|
||||
= <span class="const-default"> '$Revision: 54 $'</span>
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_ParserException.php.html#a44">44</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">SVN Revision meta data for this class</p>
|
||||
|
||||
|
||||
</div>
|
||||
<h4>Inherited Constants</h4>
|
||||
<A NAME='inherited_vars'><!-- --></A>
|
||||
<p>Inherited from <span class="classname"><a href="../../Apache/Solr/Apache_Solr_Exception.html">Apache_Solr_Exception</a></span></p>
|
||||
<blockquote>
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name"><a href="../../Apache/Solr/Apache_Solr_Exception.html#constSVN_ID">Apache_Solr_Exception::SVN_ID</a></span><br>
|
||||
</span>
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name"><a href="../../Apache/Solr/Apache_Solr_Exception.html#constSVN_REVISION">Apache_Solr_Exception::SVN_REVISION</a></span><br>
|
||||
</span>
|
||||
</blockquote>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:15 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
621
SolrPhpClient/phpdocs/Apache/Solr/Apache_Solr_Response.html
Normal file
621
SolrPhpClient/phpdocs/Apache/Solr/Apache_Solr_Response.html
Normal file
@@ -0,0 +1,621 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Apache_Solr_Response</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Class Apache_Solr_Response</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
| <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Represents a Solr response. Parses the raw response into a set of stdClass objects and associative arrays for easy access.</p>
|
||||
<p class="description"><p>Currently requires json_decode which is bundled with PHP >= 5.2.0, Alternatively can be installed with PECL. Zend Framework also includes a purely PHP solution.</p></p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_Response.php.html">/Response.php</a> (line <span class="field"><a href="../../__filesource/fsource_Apache_Solr_Response.php.html#a48">48</a></span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-const-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Class Constant Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Constants</span> (<a href="#sec-consts">details</a>)
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
|
||||
|
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="const-summary">
|
||||
<div class="const-title">
|
||||
<img src="../../media/images/Constant.png" alt=" " />
|
||||
<a href="#SVN_ID" title="details" class="const-name">SVN_ID</a> = <span class="var-type"> '$Id: Response.php 54 2011-02-04 16:29:18Z donovan.jimenez $'</span>
|
||||
|
||||
</div>
|
||||
<div class="const-title">
|
||||
<img src="../../media/images/Constant.png" alt=" " />
|
||||
<a href="#SVN_REVISION" title="details" class="const-name">SVN_REVISION</a> = <span class="var-type"> '$Revision: 54 $'</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-var-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Variable Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="var-summary">
|
||||
<div class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<a href="#$_collapseSingleValueArrays" title="details" class="var-name">$_collapseSingleValueArrays</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<span class="var-type">boolean</span>
|
||||
<a href="#$_createDocuments" title="details" class="var-name">$_createDocuments</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<span class="var-type">boolean</span>
|
||||
<a href="#$_isParsed" title="details" class="var-name">$_isParsed</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<a href="#$_parsedData" title="details" class="var-name">$_parsedData</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<span class="var-type"><a href="../../Apache/Solr/Apache_Solr_HttpTransport_Response.html">Apache_Solr_HttpTransport_Response</a></span>
|
||||
<a href="#$_response" title="details" class="var-name">$_response</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-method-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Method Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
|
||||
|
|
||||
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="method-summary">
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result"><a href="../../Apache/Solr/Apache_Solr_HttpTransport_Response.html">Apache_Solr_HttpTransport_Response</a></span>
|
||||
<a href="#__construct" title="details" class="method-name">__construct</a>
|
||||
(<span class="var-type"><a href="../../Apache/Solr/Apache_Solr_HttpTransport_Response.html">Apache_Solr_HttpTransport_Response</a></span> <span class="var-name">$response</span>, [<span class="var-type">boolean</span> <span class="var-name">$createDocuments</span> = <span class="var-default">true</span>], [<span class="var-type">boolean</span> <span class="var-name">$collapseSingleValueArrays</span> = <span class="var-default">true</span>])
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">string</span>
|
||||
<a href="#getEncoding" title="details" class="method-name">getEncoding</a>
|
||||
()
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">integer</span>
|
||||
<a href="#getHttpStatus" title="details" class="method-name">getHttpStatus</a>
|
||||
()
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">string</span>
|
||||
<a href="#getHttpStatusMessage" title="details" class="method-name">getHttpStatusMessage</a>
|
||||
()
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">string</span>
|
||||
<a href="#getRawResponse" title="details" class="method-name">getRawResponse</a>
|
||||
()
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">string</span>
|
||||
<a href="#getType" title="details" class="method-name">getType</a>
|
||||
()
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#_parseData" title="details" class="method-name">_parseData</a>
|
||||
()
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">mixed</span>
|
||||
<a href="#__get" title="details" class="method-name">__get</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$key</span>)
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">boolean</span>
|
||||
<a href="#__isset" title="details" class="method-name">__isset</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$key</span>)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-vars"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Variables</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
|
||||
|
||||
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
|
||||
<a name="var$_collapseSingleValueArrays" id="$_collapseSingleValueArrays"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="var-header">
|
||||
<span class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$_collapseSingleValueArrays</span>
|
||||
= <span class="var-default"> true</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Response.php.html#a88">88</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> protected</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$_createDocuments" id="$_createDocuments"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="var-header">
|
||||
<span class="var-title">
|
||||
<span class="var-type">boolean</span>
|
||||
<span class="var-name">$_createDocuments</span>
|
||||
= <span class="var-default"> true</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Response.php.html#a87">87</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Data parsing flags. Determines what extra processing should be done after the data is initially converted to a data structure.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> protected</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$_isParsed" id="$_isParsed"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="var-header">
|
||||
<span class="var-title">
|
||||
<span class="var-type">boolean</span>
|
||||
<span class="var-name">$_isParsed</span>
|
||||
= <span class="var-default"> false</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Response.php.html#a72">72</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Whether the raw response has been parsed</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> protected</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$_parsedData" id="$_parsedData"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="var-header">
|
||||
<span class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$_parsedData</span>
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Response.php.html#a79">79</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Parsed representation of the data</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> protected</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$_response" id="$_response"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="var-header">
|
||||
<span class="var-title">
|
||||
<span class="var-type"><a href="../../Apache/Solr/Apache_Solr_HttpTransport_Response.html">Apache_Solr_HttpTransport_Response</a></span>
|
||||
<span class="var-name">$_response</span>
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Response.php.html#a65">65</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Holds the raw response used in construction</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">var:</span> HTTP response</li>
|
||||
<li><span class="field">access:</span> protected</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
<a name="method__construct" id="__construct"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">Constructor __construct</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Response.php.html#a97">97</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Constructor. Takes the raw HTTP response body and the exploded HTTP headers</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> HTTP response</li>
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result"><a href="../../Apache/Solr/Apache_Solr_HttpTransport_Response.html">Apache_Solr_HttpTransport_Response</a></span>
|
||||
<span class="method-name">
|
||||
__construct
|
||||
</span>
|
||||
(<span class="var-type"><a href="../../Apache/Solr/Apache_Solr_HttpTransport_Response.html">Apache_Solr_HttpTransport_Response</a></span> <span class="var-name">$response</span>, [<span class="var-type">boolean</span> <span class="var-name">$createDocuments</span> = <span class="var-default">true</span>], [<span class="var-type">boolean</span> <span class="var-name">$collapseSingleValueArrays</span> = <span class="var-default">true</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">boolean</span>
|
||||
<span class="var-name">$createDocuments</span><span class="var-description">: Whether to convert the documents json_decoded as stdClass instances to Apache_Solr_Document instances</span> </li>
|
||||
<li>
|
||||
<span class="var-type">boolean</span>
|
||||
<span class="var-name">$collapseSingleValueArrays</span><span class="var-description">: Whether to make multivalued fields appear as single values</span> </li>
|
||||
<li>
|
||||
<span class="var-type"><a href="../../Apache/Solr/Apache_Solr_HttpTransport_Response.html">Apache_Solr_HttpTransport_Response</a></span>
|
||||
<span class="var-name">$response</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodgetEncoding" id="getEncoding"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">getEncoding</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Response.php.html#a139">139</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Get character encoding of this response. Should usually be utf-8, but just in case</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">string</span>
|
||||
<span class="method-name">
|
||||
getEncoding
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodgetHttpStatus" id="getHttpStatus"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">getHttpStatus</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Response.php.html#a109">109</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Get the HTTP status code</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">integer</span>
|
||||
<span class="method-name">
|
||||
getHttpStatus
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodgetHttpStatusMessage" id="getHttpStatusMessage"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">getHttpStatusMessage</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Response.php.html#a119">119</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Get the HTTP status message of the response</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">string</span>
|
||||
<span class="method-name">
|
||||
getHttpStatusMessage
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodgetRawResponse" id="getRawResponse"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">getRawResponse</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Response.php.html#a149">149</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Get the raw response as it was given to this object</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">string</span>
|
||||
<span class="method-name">
|
||||
getRawResponse
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodgetType" id="getType"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">getType</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Response.php.html#a129">129</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Get content type of this Solr response</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">string</span>
|
||||
<span class="method-name">
|
||||
getType
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="method_parseData" id="_parseData"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">_parseData</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Response.php.html#a198">198</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Parse the raw response into the parsed_data array for access</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">throws:</span> Apache_Solr_ParserException If the data could not be parsed</li>
|
||||
<li><span class="field">access:</span> protected</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
_parseData
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="method__get" id="__get"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">__get</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Response.php.html#a160">160</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Magic get to expose the parsed data and to lazily load it</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">mixed</span>
|
||||
<span class="method-name">
|
||||
__get
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$key</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$key</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="method__isset" id="__isset"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">__isset</span> (line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Response.php.html#a182">182</a></span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Magic function for isset function on parsed data</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">boolean</span>
|
||||
<span class="method-name">
|
||||
__isset
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$key</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$key</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-consts"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Class Constants</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Constants</a> (<span class="disabled">details</span>)
|
||||
|
||||
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<a name="constSVN_ID" id="SVN_ID"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="const-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name">SVN_ID</span>
|
||||
= <span class="const-default"> '$Id: Response.php 54 2011-02-04 16:29:18Z donovan.jimenez $'</span>
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Response.php.html#a58">58</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">SVN ID meta data for this class</p>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="constSVN_REVISION" id="SVN_REVISION"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="const-header">
|
||||
<img src="../../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name">SVN_REVISION</span>
|
||||
= <span class="const-default"> '$Revision: 54 $'</span>
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Response.php.html#a53">53</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">SVN Revision meta data for this class</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:15 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
2473
SolrPhpClient/phpdocs/Apache/Solr/Apache_Solr_Service.html
Normal file
2473
SolrPhpClient/phpdocs/Apache/Solr/Apache_Solr_Service.html
Normal file
File diff suppressed because it is too large
Load Diff
1606
SolrPhpClient/phpdocs/Apache/Solr/Apache_Solr_Service_Balancer.html
Normal file
1606
SolrPhpClient/phpdocs/Apache/Solr/Apache_Solr_Service_Balancer.html
Normal file
File diff suppressed because it is too large
Load Diff
74
SolrPhpClient/phpdocs/Apache/Solr/_Document.php.html
Normal file
74
SolrPhpClient/phpdocs/Apache/Solr/_Document.php.html
Normal file
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs for page Document.php</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="file-name">/Document.php</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Copyright (c) 2007-2011, Servigistics, Inc.</p>
|
||||
<p class="description"><p>All rights reserved.</p><p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</p><p><ul><li>Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.</li><li>Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.</li><li>Neither the name of Servigistics, Inc. nor the names of
|
||||
its contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.</li></ul> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">author:</span> Donovan Jimenez <<a href="mailto:djimenez@conduit-it.com">djimenez@conduit-it.com</a>></li>
|
||||
<li><span class="field">version:</span> $Id: Document.php 54 2011-02-04 16:29:18Z donovan.jimenez $</li>
|
||||
<li><span class="field">copyright:</span> Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)</li>
|
||||
<li><span class="field">filesource:</span> <a href="../../__filesource/fsource_Apache_Solr_Document.php.html">Source Code for this file</a></li>
|
||||
<li><span class="field">license:</span> <a href="http://solr-php-client.googlecode.com/svn/trunk/COPYING">New BSD</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-classes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Classes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Classes</span>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<table cellpadding="2" cellspacing="0" class="class-table">
|
||||
<tr>
|
||||
<th class="class-table-header">Class</th>
|
||||
<th class="class-table-header">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../../Apache/Solr/Apache_Solr_Document.html">Apache_Solr_Document</a>
|
||||
</td>
|
||||
<td>
|
||||
Holds Key / Value pairs that represent a Solr Document along with any associated boost values. Field values can be accessed by direct dereferencing such as:
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:13 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
63
SolrPhpClient/phpdocs/Apache/Solr/_Exception.php.html
Normal file
63
SolrPhpClient/phpdocs/Apache/Solr/_Exception.php.html
Normal file
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs for page Exception.php</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="file-name">/Exception.php</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">filesource:</span> <a href="../../__filesource/fsource_Apache_Solr_Exception.php.html">Source Code for this file</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-classes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Classes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Classes</span>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<table cellpadding="2" cellspacing="0" class="class-table">
|
||||
<tr>
|
||||
<th class="class-table-header">Class</th>
|
||||
<th class="class-table-header">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../../Apache/Solr/Apache_Solr_Exception.html">Apache_Solr_Exception</a>
|
||||
</td>
|
||||
<td>
|
||||
Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:13 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs for page Abstract.php</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="file-name">/HttpTransport/Abstract.php</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Copyright (c) 2007-2011, Servigistics, Inc.</p>
|
||||
<p class="description"><p>All rights reserved.</p><p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</p><p><ul><li>Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.</li><li>Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.</li><li>Neither the name of Servigistics, Inc. nor the names of
|
||||
its contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.</li></ul> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">author:</span> Timo Schmidt <<a href="mailto:timo.schmidt@aoemedia.de">timo.schmidt@aoemedia.de</a>>, Donovan Jimenez <djimenez@conduit-it.com></li>
|
||||
<li><span class="field">version:</span> $Id: $</li>
|
||||
<li><span class="field">copyright:</span> Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)</li>
|
||||
<li><span class="field">filesource:</span> <a href="../../__filesource/fsource_Apache_Solr_HttpTransportAbstract.php.html">Source Code for this file</a></li>
|
||||
<li><span class="field">license:</span> <a href="http://solr-php-client.googlecode.com/svn/trunk/COPYING">New BSD</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-classes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Classes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Classes</span>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<table cellpadding="2" cellspacing="0" class="class-table">
|
||||
<tr>
|
||||
<th class="class-table-header">Class</th>
|
||||
<th class="class-table-header">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../../Apache/Solr/Apache_Solr_HttpTransport_Abstract.html">Apache_Solr_HttpTransport_Abstract</a>
|
||||
</td>
|
||||
<td>
|
||||
Convenience class that implements the transport implementation. Can be extended by
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:08 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
101
SolrPhpClient/phpdocs/Apache/Solr/_HttpTransport---Curl.php.html
Normal file
101
SolrPhpClient/phpdocs/Apache/Solr/_HttpTransport---Curl.php.html
Normal file
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs for page Curl.php</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="file-name">/HttpTransport/Curl.php</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
| <a href="#sec-includes">Includes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Copyright (c) 2007-2011, Servigistics, Inc.</p>
|
||||
<p class="description"><p>All rights reserved.</p><p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</p><p><ul><li>Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.</li><li>Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.</li><li>Neither the name of Servigistics, Inc. nor the names of
|
||||
its contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.</li></ul> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">author:</span> Timo Schmidt <<a href="mailto:timo.schmidt@aoemedia.de">timo.schmidt@aoemedia.de</a>>, Donovan Jimenez <djimenez@conduit-it.com></li>
|
||||
<li><span class="field">version:</span> $Id: $</li>
|
||||
<li><span class="field">copyright:</span> Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)</li>
|
||||
<li><span class="field">filesource:</span> <a href="../../__filesource/fsource_Apache_Solr_HttpTransportCurl.php.html">Source Code for this file</a></li>
|
||||
<li><span class="field">license:</span> <a href="http://solr-php-client.googlecode.com/svn/trunk/COPYING">New BSD</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-classes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Classes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Classes</span>
|
||||
| <a href="#sec-includes">Includes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<table cellpadding="2" cellspacing="0" class="class-table">
|
||||
<tr>
|
||||
<th class="class-table-header">Class</th>
|
||||
<th class="class-table-header">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../../Apache/Solr/Apache_Solr_HttpTransport_Curl.html">Apache_Solr_HttpTransport_Curl</a>
|
||||
</td>
|
||||
<td>
|
||||
A Curl based HTTP transport. Uses a single curl session for all requests.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-includes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Includes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
| <span class="disabled">Includes</span>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<a name="_dirname(__FILE__)_/Abstract_php"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div>
|
||||
<span class="include-title">
|
||||
<span class="include-type">require_once</span>
|
||||
(<span class="include-name">dirname(__FILE__).'/Abstract.php'</span>)
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportCurl.php.html#a40">40</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:11 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs for page CurlNoReuse.php</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="file-name">/HttpTransport/CurlNoReuse.php</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
| <a href="#sec-includes">Includes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Copyright (c) 2007-2011, Servigistics, Inc.</p>
|
||||
<p class="description"><p>All rights reserved.</p><p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</p><p><ul><li>Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.</li><li>Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.</li><li>Neither the name of Servigistics, Inc. nor the names of
|
||||
its contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.</li></ul> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">author:</span> Timo Schmidt <<a href="mailto:timo.schmidt@aoemedia.de">timo.schmidt@aoemedia.de</a>>, Donovan Jimenez <djimenez@conduit-it.com></li>
|
||||
<li><span class="field">version:</span> $Id: $</li>
|
||||
<li><span class="field">copyright:</span> Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)</li>
|
||||
<li><span class="field">filesource:</span> <a href="../../__filesource/fsource_Apache_Solr_HttpTransportCurlNoReuse.php.html">Source Code for this file</a></li>
|
||||
<li><span class="field">license:</span> <a href="http://solr-php-client.googlecode.com/svn/trunk/COPYING">New BSD</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-classes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Classes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Classes</span>
|
||||
| <a href="#sec-includes">Includes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<table cellpadding="2" cellspacing="0" class="class-table">
|
||||
<tr>
|
||||
<th class="class-table-header">Class</th>
|
||||
<th class="class-table-header">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../../Apache/Solr/Apache_Solr_HttpTransport_CurlNoReuse.html">Apache_Solr_HttpTransport_CurlNoReuse</a>
|
||||
</td>
|
||||
<td>
|
||||
An alternative Curl HTTP transport that opens and closes a curl session for every request. This isn't the recommended way to use curl, but some version of PHP have memory issues.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-includes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Includes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
| <span class="disabled">Includes</span>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<a name="_dirname(__FILE__)_/Abstract_php"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div>
|
||||
<span class="include-title">
|
||||
<span class="include-type">require_once</span>
|
||||
(<span class="include-name">dirname(__FILE__).'/Abstract.php'</span>)
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportCurlNoReuse.php.html#a40">40</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:12 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs for page FileGetContents.php</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="file-name">/HttpTransport/FileGetContents.php</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
| <a href="#sec-includes">Includes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Copyright (c) 2007-2011, Servigistics, Inc.</p>
|
||||
<p class="description"><p>All rights reserved.</p><p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</p><p><ul><li>Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.</li><li>Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.</li><li>Neither the name of Servigistics, Inc. nor the names of
|
||||
its contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.</li></ul> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">author:</span> Donovan Jimenez <<a href="mailto:djimenez@conduit-it.com">djimenez@conduit-it.com</a>></li>
|
||||
<li><span class="field">version:</span> $Id: $</li>
|
||||
<li><span class="field">copyright:</span> Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)</li>
|
||||
<li><span class="field">filesource:</span> <a href="../../__filesource/fsource_Apache_Solr_HttpTransportFileGetContents.php.html">Source Code for this file</a></li>
|
||||
<li><span class="field">license:</span> <a href="http://solr-php-client.googlecode.com/svn/trunk/COPYING">New BSD</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-classes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Classes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Classes</span>
|
||||
| <a href="#sec-includes">Includes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<table cellpadding="2" cellspacing="0" class="class-table">
|
||||
<tr>
|
||||
<th class="class-table-header">Class</th>
|
||||
<th class="class-table-header">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../../Apache/Solr/Apache_Solr_HttpTransport_FileGetContents.html">Apache_Solr_HttpTransport_FileGetContents</a>
|
||||
</td>
|
||||
<td>
|
||||
HTTP Transport implemenation that uses the builtin http URL wrappers and file_get_contents
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-includes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Includes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
| <span class="disabled">Includes</span>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<a name="_dirname(__FILE__)_/Abstract_php"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div>
|
||||
<span class="include-title">
|
||||
<span class="include-type">require_once</span>
|
||||
(<span class="include-name">dirname(__FILE__).'/Abstract.php'</span>)
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportFileGetContents.php.html#a40">40</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:13 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs for page Interface.php</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="file-name">/HttpTransport/Interface.php</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
| <a href="#sec-includes">Includes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Copyright (c) 2007-2011, Servigistics, Inc.</p>
|
||||
<p class="description"><p>All rights reserved.</p><p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</p><p><ul><li>Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.</li><li>Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.</li><li>Neither the name of Servigistics, Inc. nor the names of
|
||||
its contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.</li></ul> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">author:</span> Timo Schmidt <<a href="mailto:timo.schmidt@aoemedia.de">timo.schmidt@aoemedia.de</a>>, Donovan Jimenez <djimenez@conduit-it.com></li>
|
||||
<li><span class="field">version:</span> $Id: $</li>
|
||||
<li><span class="field">copyright:</span> Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)</li>
|
||||
<li><span class="field">filesource:</span> <a href="../../__filesource/fsource_Apache_Solr_HttpTransportInterface.php.html">Source Code for this file</a></li>
|
||||
<li><span class="field">license:</span> <a href="http://solr-php-client.googlecode.com/svn/trunk/COPYING">New BSD</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-classes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Classes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Classes</span>
|
||||
| <a href="#sec-includes">Includes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<table cellpadding="2" cellspacing="0" class="class-table">
|
||||
<tr>
|
||||
<th class="class-table-header">Class</th>
|
||||
<th class="class-table-header">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../../Apache/Solr/Apache_Solr_HttpTransport_Interface.html">Apache_Solr_HttpTransport_Interface</a>
|
||||
</td>
|
||||
<td>
|
||||
Interface that all Transport (HTTP Requester) implementations must implement. These
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-includes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Includes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
| <span class="disabled">Includes</span>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<a name="_dirname(__FILE__)_/Response_php"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div>
|
||||
<span class="include-title">
|
||||
<span class="include-type">require_once</span>
|
||||
(<span class="include-name">dirname(__FILE__).'/Response.php'</span>)
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_HttpTransportInterface.php.html#a40">40</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:14 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs for page Response.php</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="file-name">/HttpTransport/Response.php</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Copyright (c) 2007-2011, Servigistics, Inc.</p>
|
||||
<p class="description"><p>All rights reserved.</p><p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</p><p><ul><li>Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.</li><li>Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.</li><li>Neither the name of Servigistics, Inc. nor the names of
|
||||
its contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.</li></ul> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">author:</span> Donovan Jimenez <<a href="mailto:djimenez@conduit-it.com">djimenez@conduit-it.com</a>></li>
|
||||
<li><span class="field">version:</span> $Id: $</li>
|
||||
<li><span class="field">copyright:</span> Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)</li>
|
||||
<li><span class="field">filesource:</span> <a href="../../__filesource/fsource_Apache_Solr_HttpTransportResponse.php.html">Source Code for this file</a></li>
|
||||
<li><span class="field">license:</span> <a href="http://solr-php-client.googlecode.com/svn/trunk/COPYING">New BSD</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-classes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Classes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Classes</span>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<table cellpadding="2" cellspacing="0" class="class-table">
|
||||
<tr>
|
||||
<th class="class-table-header">Class</th>
|
||||
<th class="class-table-header">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../../Apache/Solr/Apache_Solr_HttpTransport_Response.html">Apache_Solr_HttpTransport_Response</a>
|
||||
</td>
|
||||
<td>
|
||||
Represents the required pieces of an HTTP response provided by HTTP transport
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:15 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs for page HttpTransportException.php</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="file-name">/HttpTransportException.php</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">filesource:</span> <a href="../../__filesource/fsource_Apache_Solr_HttpTransportException.php.html">Source Code for this file</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-classes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Classes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Classes</span>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<table cellpadding="2" cellspacing="0" class="class-table">
|
||||
<tr>
|
||||
<th class="class-table-header">Class</th>
|
||||
<th class="class-table-header">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../../Apache/Solr/Apache_Solr_HttpTransportException.html">Apache_Solr_HttpTransportException</a>
|
||||
</td>
|
||||
<td>
|
||||
Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:14 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs for page InvalidArgumentException.php</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="file-name">/InvalidArgumentException.php</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">filesource:</span> <a href="../../__filesource/fsource_Apache_Solr_InvalidArgumentException.php.html">Source Code for this file</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-classes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Classes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Classes</span>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<table cellpadding="2" cellspacing="0" class="class-table">
|
||||
<tr>
|
||||
<th class="class-table-header">Class</th>
|
||||
<th class="class-table-header">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../../Apache/Solr/Apache_Solr_InvalidArgumentException.html">Apache_Solr_InvalidArgumentException</a>
|
||||
</td>
|
||||
<td>
|
||||
Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:15 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs for page NoServiceAvailableException.php</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="file-name">/NoServiceAvailableException.php</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">filesource:</span> <a href="../../__filesource/fsource_Apache_Solr_NoServiceAvailableException.php.html">Source Code for this file</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-classes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Classes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Classes</span>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<table cellpadding="2" cellspacing="0" class="class-table">
|
||||
<tr>
|
||||
<th class="class-table-header">Class</th>
|
||||
<th class="class-table-header">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../../Apache/Solr/Apache_Solr_NoServiceAvailableException.html">Apache_Solr_NoServiceAvailableException</a>
|
||||
</td>
|
||||
<td>
|
||||
Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:15 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
63
SolrPhpClient/phpdocs/Apache/Solr/_ParserException.php.html
Normal file
63
SolrPhpClient/phpdocs/Apache/Solr/_ParserException.php.html
Normal file
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs for page ParserException.php</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="file-name">/ParserException.php</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">filesource:</span> <a href="../../__filesource/fsource_Apache_Solr_ParserException.php.html">Source Code for this file</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-classes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Classes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Classes</span>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<table cellpadding="2" cellspacing="0" class="class-table">
|
||||
<tr>
|
||||
<th class="class-table-header">Class</th>
|
||||
<th class="class-table-header">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../../Apache/Solr/Apache_Solr_ParserException.html">Apache_Solr_ParserException</a>
|
||||
</td>
|
||||
<td>
|
||||
Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:15 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
101
SolrPhpClient/phpdocs/Apache/Solr/_Response.php.html
Normal file
101
SolrPhpClient/phpdocs/Apache/Solr/_Response.php.html
Normal file
@@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs for page Response.php</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="file-name">/Response.php</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
| <a href="#sec-includes">Includes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Copyright (c) 2007-2011, Servigistics, Inc.</p>
|
||||
<p class="description"><p>All rights reserved.</p><p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</p><p><ul><li>Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.</li><li>Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.</li><li>Neither the name of Servigistics, Inc. nor the names of
|
||||
its contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.</li></ul> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">author:</span> Donovan Jimenez <<a href="mailto:djimenez@conduit-it.com">djimenez@conduit-it.com</a>></li>
|
||||
<li><span class="field">version:</span> $Id: Response.php 54 2011-02-04 16:29:18Z donovan.jimenez $</li>
|
||||
<li><span class="field">copyright:</span> Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)</li>
|
||||
<li><span class="field">filesource:</span> <a href="../../__filesource/fsource_Apache_Solr_Response.php.html">Source Code for this file</a></li>
|
||||
<li><span class="field">license:</span> <a href="http://solr-php-client.googlecode.com/svn/trunk/COPYING">New BSD</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-classes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Classes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Classes</span>
|
||||
| <a href="#sec-includes">Includes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<table cellpadding="2" cellspacing="0" class="class-table">
|
||||
<tr>
|
||||
<th class="class-table-header">Class</th>
|
||||
<th class="class-table-header">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../../Apache/Solr/Apache_Solr_Response.html">Apache_Solr_Response</a>
|
||||
</td>
|
||||
<td>
|
||||
Represents a Solr response. Parses the raw response into a set of stdClass objects and associative arrays for easy access.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-includes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Includes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
| <span class="disabled">Includes</span>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<a name="_dirname(__FILE__)_/ParserException_php"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div>
|
||||
<span class="include-title">
|
||||
<span class="include-type">require_once</span>
|
||||
(<span class="include-name">dirname(__FILE__).'/ParserException.php'</span>)
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Response.php.html#a39">39</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:15 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
115
SolrPhpClient/phpdocs/Apache/Solr/_Service---Balancer.php.html
Normal file
115
SolrPhpClient/phpdocs/Apache/Solr/_Service---Balancer.php.html
Normal file
@@ -0,0 +1,115 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs for page Balancer.php</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="file-name">/Service/Balancer.php</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
| <a href="#sec-includes">Includes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Copyright (c) 2007-2011, Servigistics, Inc.</p>
|
||||
<p class="description"><p>All rights reserved.</p><p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</p><p><ul><li>Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.</li><li>Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.</li><li>Neither the name of Servigistics, Inc. nor the names of
|
||||
its contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.</li></ul> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">author:</span> Donovan Jimenez <<a href="mailto:djimenez@conduit-it.com">djimenez@conduit-it.com</a>>, Dan Wolfe</li>
|
||||
<li><span class="field">version:</span> $Id: Balancer.php 54 2011-02-04 16:29:18Z donovan.jimenez $</li>
|
||||
<li><span class="field">copyright:</span> Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)</li>
|
||||
<li><span class="field">filesource:</span> <a href="../../__filesource/fsource_Apache_Solr_ServiceBalancer.php.html">Source Code for this file</a></li>
|
||||
<li><span class="field">license:</span> <a href="http://solr-php-client.googlecode.com/svn/trunk/COPYING">New BSD</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-classes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Classes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Classes</span>
|
||||
| <a href="#sec-includes">Includes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<table cellpadding="2" cellspacing="0" class="class-table">
|
||||
<tr>
|
||||
<th class="class-table-header">Class</th>
|
||||
<th class="class-table-header">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../../Apache/Solr/Apache_Solr_Service_Balancer.html">Apache_Solr_Service_Balancer</a>
|
||||
</td>
|
||||
<td>
|
||||
Reference Implementation for using multiple Solr services in a distribution. Functionality
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-includes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Includes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
| <span class="disabled">Includes</span>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<a name="_dirname(dirname(__FILE__))_/Service_php"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div>
|
||||
<span class="include-title">
|
||||
<span class="include-type">require_once</span>
|
||||
(<span class="include-name">dirname(dirname(__FILE__)).'/Service.php'</span>)
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_ServiceBalancer.php.html#a41">41</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
|
||||
</div>
|
||||
<a name="_dirname(dirname(__FILE__))_/NoServiceAvailableException_php"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div>
|
||||
<span class="include-title">
|
||||
<span class="include-type">require_once</span>
|
||||
(<span class="include-name">dirname(dirname(__FILE__)).'/NoServiceAvailableException.php'</span>)
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_ServiceBalancer.php.html#a43">43</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:08 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
171
SolrPhpClient/phpdocs/Apache/Solr/_Service.php.html
Normal file
171
SolrPhpClient/phpdocs/Apache/Solr/_Service.php.html
Normal file
@@ -0,0 +1,171 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs for page Service.php</title>
|
||||
<link rel="stylesheet" href="../../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="file-name">/Service.php</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
| <a href="#sec-includes">Includes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Copyright (c) 2007-2011, Servigistics, Inc.</p>
|
||||
<p class="description"><p>All rights reserved.</p><p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</p><p><ul><li>Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.</li><li>Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.</li><li>Neither the name of Servigistics, Inc. nor the names of
|
||||
its contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.</li></ul> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">author:</span> Donovan Jimenez <<a href="mailto:djimenez@conduit-it.com">djimenez@conduit-it.com</a>></li>
|
||||
<li><span class="field">version:</span> $Id: Service.php 59 2011-02-08 20:38:59Z donovan.jimenez $</li>
|
||||
<li><span class="field">copyright:</span> Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)</li>
|
||||
<li><span class="field">filesource:</span> <a href="../../__filesource/fsource_Apache_Solr_Service.php.html">Source Code for this file</a></li>
|
||||
<li><span class="field">license:</span> <a href="http://solr-php-client.googlecode.com/svn/trunk/COPYING">New BSD</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-classes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Classes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Classes</span>
|
||||
| <a href="#sec-includes">Includes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<table cellpadding="2" cellspacing="0" class="class-table">
|
||||
<tr>
|
||||
<th class="class-table-header">Class</th>
|
||||
<th class="class-table-header">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../../Apache/Solr/Apache_Solr_Service.html">Apache_Solr_Service</a>
|
||||
</td>
|
||||
<td>
|
||||
Starting point for the Solr API. Represents a Solr server resource and has methods for pinging, adding, deleting, committing, optimizing and searching.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-includes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Includes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
| <span class="disabled">Includes</span>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<a name="_dirname(__FILE__)_/HttpTransportException_php"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div>
|
||||
<span class="include-title">
|
||||
<span class="include-type">require_once</span>
|
||||
(<span class="include-name">dirname(__FILE__).'/HttpTransportException.php'</span>)
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Service.php.html#a42">42</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
|
||||
</div>
|
||||
<a name="_dirname(__FILE__)_/Exception_php"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div>
|
||||
<span class="include-title">
|
||||
<span class="include-type">require_once</span>
|
||||
(<span class="include-name">dirname(__FILE__).'/Exception.php'</span>)
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Service.php.html#a41">41</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
|
||||
</div>
|
||||
<a name="_dirname(__FILE__)_/InvalidArgumentException_php"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div>
|
||||
<span class="include-title">
|
||||
<span class="include-type">require_once</span>
|
||||
(<span class="include-name">dirname(__FILE__).'/InvalidArgumentException.php'</span>)
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Service.php.html#a43">43</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
|
||||
</div>
|
||||
<a name="_dirname(__FILE__)_/Document_php"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div>
|
||||
<span class="include-title">
|
||||
<span class="include-type">require_once</span>
|
||||
(<span class="include-name">dirname(__FILE__).'/Document.php'</span>)
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Service.php.html#a45">45</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
|
||||
</div>
|
||||
<a name="_dirname(__FILE__)_/HttpTransport/Interface_php"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div>
|
||||
<span class="include-title">
|
||||
<span class="include-type">require_once</span>
|
||||
(<span class="include-name">dirname(__FILE__).'/HttpTransport/Interface.php'</span>)
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Service.php.html#a48">48</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
|
||||
</div>
|
||||
<a name="_dirname(__FILE__)_/Response_php"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div>
|
||||
<span class="include-title">
|
||||
<span class="include-type">require_once</span>
|
||||
(<span class="include-name">dirname(__FILE__).'/Response.php'</span>)
|
||||
(line <span class="line-number"><a href="../../__filesource/fsource_Apache_Solr_Service.php.html#a46">46</a></span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:16 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
||||
@@ -0,0 +1,387 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>File Source for Document.php</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Source for file Document.php</h1>
|
||||
<p>Documentation is available at <a href="../Apache/Solr/_Document.php.html">Document.php</a></p>
|
||||
<div class="src-code">
|
||||
<div class="src-code"><ol><li><div class="src-line"><a name="a1"></a><span class="src-php"><?php</span></div></li>
|
||||
<li><div class="src-line"><a name="a2"></a><span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a3"></a><span class="src-doc"> * Copyright (c) 2007-2011, Servigistics, Inc.</span></div></li>
|
||||
<li><div class="src-line"><a name="a4"></a><span class="src-doc"> * All rights reserved.</span></div></li>
|
||||
<li><div class="src-line"><a name="a5"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a6"></a><span class="src-doc"> * Redistribution and use in source and binary forms, with or without</span></div></li>
|
||||
<li><div class="src-line"><a name="a7"></a><span class="src-doc"> * modification, are permitted provided that the following conditions are met:</span></div></li>
|
||||
<li><div class="src-line"><a name="a8"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a9"></a><span class="src-doc"> * - Redistributions of source code must retain the above copyright notice,</span></div></li>
|
||||
<li><div class="src-line"><a name="a10"></a><span class="src-doc"> * this list of conditions and the following disclaimer.</span></div></li>
|
||||
<li><div class="src-line"><a name="a11"></a><span class="src-doc"> * - Redistributions in binary form must reproduce the above copyright</span></div></li>
|
||||
<li><div class="src-line"><a name="a12"></a><span class="src-doc"> * notice, this list of conditions and the following disclaimer in the</span></div></li>
|
||||
<li><div class="src-line"><a name="a13"></a><span class="src-doc"> * documentation and/or other materials provided with the distribution.</span></div></li>
|
||||
<li><div class="src-line"><a name="a14"></a><span class="src-doc"> * - Neither the name of Servigistics, Inc. nor the names of</span></div></li>
|
||||
<li><div class="src-line"><a name="a15"></a><span class="src-doc"> * its contributors may be used to endorse or promote products derived from</span></div></li>
|
||||
<li><div class="src-line"><a name="a16"></a><span class="src-doc"> * this software without specific prior written permission.</span></div></li>
|
||||
<li><div class="src-line"><a name="a17"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a18"></a><span class="src-doc"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"</span></div></li>
|
||||
<li><div class="src-line"><a name="a19"></a><span class="src-doc"> * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div></li>
|
||||
<li><div class="src-line"><a name="a20"></a><span class="src-doc"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div></li>
|
||||
<li><div class="src-line"><a name="a21"></a><span class="src-doc"> * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE</span></div></li>
|
||||
<li><div class="src-line"><a name="a22"></a><span class="src-doc"> * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div></li>
|
||||
<li><div class="src-line"><a name="a23"></a><span class="src-doc"> * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div></li>
|
||||
<li><div class="src-line"><a name="a24"></a><span class="src-doc"> * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div></li>
|
||||
<li><div class="src-line"><a name="a25"></a><span class="src-doc"> * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div></li>
|
||||
<li><div class="src-line"><a name="a26"></a><span class="src-doc"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div></li>
|
||||
<li><div class="src-line"><a name="a27"></a><span class="src-doc"> * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div></li>
|
||||
<li><div class="src-line"><a name="a28"></a><span class="src-doc"> * POSSIBILITY OF SUCH DAMAGE.</span></div></li>
|
||||
<li><div class="src-line"><a name="a29"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a30"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@copyright</span><span class="src-doc"> Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)</span></div></li>
|
||||
<li><div class="src-line"><a name="a31"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@license</span><span class="src-doc"> http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD</span></div></li>
|
||||
<li><div class="src-line"><a name="a32"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> $Id: Document.php 54 2011-02-04 16:29:18Z donovan.jimenez $</span></div></li>
|
||||
<li><div class="src-line"><a name="a33"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a34"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@package</span><span class="src-doc"> Apache</span></div></li>
|
||||
<li><div class="src-line"><a name="a35"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@subpackage</span><span class="src-doc"> Solr</span></div></li>
|
||||
<li><div class="src-line"><a name="a36"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@author</span><span class="src-doc"> Donovan Jimenez <djimenez@conduit-it.com></span></div></li>
|
||||
<li><div class="src-line"><a name="a37"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a38"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a39"></a><span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a40"></a><span class="src-doc"> * Holds Key / Value pairs that represent a Solr Document along with any associated boost</span></div></li>
|
||||
<li><div class="src-line"><a name="a41"></a><span class="src-doc"> * values. Field values can be accessed by direct dereferencing such as:</span></div></li>
|
||||
<li><div class="src-line"><a name="a42"></a><span class="src-doc"> * <code></span></div></li>
|
||||
<li><div class="src-line"><a name="a43"></a><span class="src-doc"> * ...</span></div></li>
|
||||
<li><div class="src-line"><a name="a44"></a><span class="src-doc"> * $document->title = 'Something';</span></div></li>
|
||||
<li><div class="src-line"><a name="a45"></a><span class="src-doc"> * echo $document->title;</span></div></li>
|
||||
<li><div class="src-line"><a name="a46"></a><span class="src-doc"> * ...</span></div></li>
|
||||
<li><div class="src-line"><a name="a47"></a><span class="src-doc"> * </code></span></div></li>
|
||||
<li><div class="src-line"><a name="a48"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a49"></a><span class="src-doc"> * Additionally, the field values can be iterated with foreach</span></div></li>
|
||||
<li><div class="src-line"><a name="a50"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a51"></a><span class="src-doc"> * <code></span></div></li>
|
||||
<li><div class="src-line"><a name="a52"></a><span class="src-doc"> * foreach ($document as $fieldName => $fieldValue)</span></div></li>
|
||||
<li><div class="src-line"><a name="a53"></a><span class="src-doc"> * {</span></div></li>
|
||||
<li><div class="src-line"><a name="a54"></a><span class="src-doc"> * ...</span></div></li>
|
||||
<li><div class="src-line"><a name="a55"></a><span class="src-doc"> * }</span></div></li>
|
||||
<li><div class="src-line"><a name="a56"></a><span class="src-doc"> * </code></span></div></li>
|
||||
<li><div class="src-line"><a name="a57"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a58"></a><span class="src-key">class </span><a href="../Apache/Solr/Apache_Solr_Document.html">Apache_Solr_Document</a> <span class="src-key">implements </span><span class="src-id">IteratorAggregate</span></div></li>
|
||||
<li><div class="src-line"><a name="a59"></a><span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a60"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a61"></a><span class="src-doc"> * SVN Revision meta data for this class</span></div></li>
|
||||
<li><div class="src-line"><a name="a62"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a63"></a> <span class="src-key">const </span><span class="src-id">SVN_REVISION </span>= <span class="src-str">'$Revision: 54 $'</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a64"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a65"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a66"></a><span class="src-doc"> * SVN ID meta data for this class</span></div></li>
|
||||
<li><div class="src-line"><a name="a67"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a68"></a> <span class="src-key">const </span><span class="src-id">SVN_ID </span>= <span class="src-str">'$Id: Document.php 54 2011-02-04 16:29:18Z donovan.jimenez $'</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a69"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a70"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a71"></a><span class="src-doc"> * Document boost value</span></div></li>
|
||||
<li><div class="src-line"><a name="a72"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a73"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">float </span></div></li>
|
||||
<li><div class="src-line"><a name="a74"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a75"></a> <span class="src-key">protected </span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_documentBoost">$_documentBoost</a> = <span class="src-id">false</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a76"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a77"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a78"></a><span class="src-doc"> * Document field values, indexed by name</span></div></li>
|
||||
<li><div class="src-line"><a name="a79"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a80"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">array </span></div></li>
|
||||
<li><div class="src-line"><a name="a81"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a82"></a> <span class="src-key">protected </span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_fields">$_fields</a> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a83"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a84"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a85"></a><span class="src-doc"> * Document field boost values, indexed by name</span></div></li>
|
||||
<li><div class="src-line"><a name="a86"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a87"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">array </span><span class="src-doc">array of floats</span></div></li>
|
||||
<li><div class="src-line"><a name="a88"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a89"></a> <span class="src-key">protected </span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_fieldBoosts">$_fieldBoosts</a> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a90"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a91"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a92"></a><span class="src-doc"> * Clear all boosts and fields from this document</span></div></li>
|
||||
<li><div class="src-line"><a name="a93"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a94"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Document.html#methodclear">clear</a><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a95"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a96"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_documentBoost">_documentBoost</a> = <span class="src-id">false</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a97"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a98"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_fields">_fields</a> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a99"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_fieldBoosts">_fieldBoosts</a> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a100"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a101"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a102"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a103"></a><span class="src-doc"> * Get current document boost</span></div></li>
|
||||
<li><div class="src-line"><a name="a104"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a105"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">mixed </span><span class="src-doc">will be false for default, or else a float</span></div></li>
|
||||
<li><div class="src-line"><a name="a106"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a107"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Document.html#methodgetBoost">getBoost</a><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a108"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a109"></a> <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_documentBoost">_documentBoost</a><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a110"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a111"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a112"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a113"></a><span class="src-doc"> * Set document boost factor</span></div></li>
|
||||
<li><div class="src-line"><a name="a114"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a115"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">mixed </span><span class="src-doc-var">$boost </span><span class="src-doc">Use false for default boost, else cast to float that should be > 0 or will be treated as false</span></div></li>
|
||||
<li><div class="src-line"><a name="a116"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a117"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Document.html#methodsetBoost">setBoost</a><span class="src-sym">(</span><span class="src-var">$boost</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a118"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a119"></a> <span class="src-var">$boost </span>= (float) <span class="src-var">$boost</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a120"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a121"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$boost </span>> <span class="src-num">0.0</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a122"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a123"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_documentBoost">_documentBoost</a> = <span class="src-var">$boost</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a124"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a125"></a> <span class="src-key">else</span></div></li>
|
||||
<li><div class="src-line"><a name="a126"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a127"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_documentBoost">_documentBoost</a> = <span class="src-id">false</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a128"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a129"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a130"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a131"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a132"></a><span class="src-doc"> * Add a value to a multi-valued field</span></div></li>
|
||||
<li><div class="src-line"><a name="a133"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a134"></a><span class="src-doc"> * NOTE: the solr XML format allows you to specify boosts</span></div></li>
|
||||
<li><div class="src-line"><a name="a135"></a><span class="src-doc"> * PER value even though the underlying Lucene implementation</span></div></li>
|
||||
<li><div class="src-line"><a name="a136"></a><span class="src-doc"> * only allows a boost per field. To remedy this, the final</span></div></li>
|
||||
<li><div class="src-line"><a name="a137"></a><span class="src-doc"> * field boost value will be the product of all specified boosts</span></div></li>
|
||||
<li><div class="src-line"><a name="a138"></a><span class="src-doc"> * on field values - this is similar to SolrJ's functionality.</span></div></li>
|
||||
<li><div class="src-line"><a name="a139"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a140"></a><span class="src-doc"> * <code></span></div></li>
|
||||
<li><div class="src-line"><a name="a141"></a><span class="src-doc"> * $doc = new Apache_Solr_Document();</span></div></li>
|
||||
<li><div class="src-line"><a name="a142"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a143"></a><span class="src-doc"> * $doc->addField('foo', 'bar', 2.0);</span></div></li>
|
||||
<li><div class="src-line"><a name="a144"></a><span class="src-doc"> * $doc->addField('foo', 'baz', 3.0);</span></div></li>
|
||||
<li><div class="src-line"><a name="a145"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a146"></a><span class="src-doc"> * // resultant field boost will be 6!</span></div></li>
|
||||
<li><div class="src-line"><a name="a147"></a><span class="src-doc"> * echo $doc->getFieldBoost('foo');</span></div></li>
|
||||
<li><div class="src-line"><a name="a148"></a><span class="src-doc"> * </code></span></div></li>
|
||||
<li><div class="src-line"><a name="a149"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a150"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$key </span></div></li>
|
||||
<li><div class="src-line"><a name="a151"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">mixed </span><span class="src-doc-var">$value </span></div></li>
|
||||
<li><div class="src-line"><a name="a152"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">mixed </span><span class="src-doc-var">$boost </span><span class="src-doc">Use false for default boost, else cast to float that should be > 0 or will be treated as false</span></div></li>
|
||||
<li><div class="src-line"><a name="a153"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a154"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Document.html#methodaddField">addField</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">, </span><span class="src-var">$value</span><span class="src-sym">, </span><span class="src-var">$boost </span>= <span class="src-id">false</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a155"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a156"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_fields">_fields</a><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">))</span></div></li>
|
||||
<li><div class="src-line"><a name="a157"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a158"></a> <span class="src-comm">// create holding array if this is the first value</span></div></li>
|
||||
<li><div class="src-line"><a name="a159"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_fields">_fields</a><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">] </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a160"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a161"></a> <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_fields">_fields</a><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">))</span></div></li>
|
||||
<li><div class="src-line"><a name="a162"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a163"></a> <span class="src-comm">// move existing value into array if it is not already an array</span></div></li>
|
||||
<li><div class="src-line"><a name="a164"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_fields">_fields</a><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">] </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_fields">_fields</a><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a165"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a166"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a167"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#methodgetFieldBoost">getFieldBoost</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">) </span>=== <span class="src-id">false</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a168"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a169"></a> <span class="src-comm">// boost not already set, set it now</span></div></li>
|
||||
<li><div class="src-line"><a name="a170"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#methodsetFieldBoost">setFieldBoost</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">, </span><span class="src-var">$boost</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a171"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a172"></a> <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span>(float) <span class="src-var">$boost </span>> <span class="src-num">0.0</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a173"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a174"></a> <span class="src-comm">// multiply passed boost with current field boost - similar to SolrJ implementation</span></div></li>
|
||||
<li><div class="src-line"><a name="a175"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_fieldBoosts">_fieldBoosts</a><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">] </span>*= (float) <span class="src-var">$boost</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a176"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a177"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a178"></a> <span class="src-comm">// add value to array</span></div></li>
|
||||
<li><div class="src-line"><a name="a179"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_fields">_fields</a><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-var">$value</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a180"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a181"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a182"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a183"></a><span class="src-doc"> * Handle the array manipulation for a multi-valued field</span></div></li>
|
||||
<li><div class="src-line"><a name="a184"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a185"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$key </span></div></li>
|
||||
<li><div class="src-line"><a name="a186"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$value </span></div></li>
|
||||
<li><div class="src-line"><a name="a187"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">mixed </span><span class="src-doc-var">$boost </span><span class="src-doc">Use false for default boost, else cast to float that should be > 0 or will be treated as false</span></div></li>
|
||||
<li><div class="src-line"><a name="a188"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a189"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@deprecated</span><span class="src-doc"> Use addField(...) instead</span></div></li>
|
||||
<li><div class="src-line"><a name="a190"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a191"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Document.html#methodsetMultiValue">setMultiValue</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">, </span><span class="src-var">$value</span><span class="src-sym">, </span><span class="src-var">$boost </span>= <span class="src-id">false</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a192"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a193"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#methodaddField">addField</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">, </span><span class="src-var">$value</span><span class="src-sym">, </span><span class="src-var">$boost</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a194"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a195"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a196"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a197"></a><span class="src-doc"> * Get field information</span></div></li>
|
||||
<li><div class="src-line"><a name="a198"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a199"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$key </span></div></li>
|
||||
<li><div class="src-line"><a name="a200"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">mixed </span><span class="src-doc">associative array of info if field exists, false otherwise</span></div></li>
|
||||
<li><div class="src-line"><a name="a201"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a202"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Document.html#methodgetField">getField</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a203"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a204"></a> <span class="src-key">if </span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_fields">_fields</a><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">))</span></div></li>
|
||||
<li><div class="src-line"><a name="a205"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a206"></a> <span class="src-key">return </span><span class="src-key">array</span><span class="src-sym">(</span></div></li>
|
||||
<li><div class="src-line"><a name="a207"></a> <span class="src-str">'name' </span>=> <span class="src-var">$key</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a208"></a> <span class="src-str">'value' </span>=> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_fields">_fields</a><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a209"></a> <span class="src-str">'boost' </span>=> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#methodgetFieldBoost">getFieldBoost</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a210"></a> <span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a211"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a212"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a213"></a> <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a214"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a215"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a216"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a217"></a><span class="src-doc"> * Set a field value. Multi-valued fields should be set as arrays</span></div></li>
|
||||
<li><div class="src-line"><a name="a218"></a><span class="src-doc"> * or instead use the addField(...) function which will automatically</span></div></li>
|
||||
<li><div class="src-line"><a name="a219"></a><span class="src-doc"> * make sure the field is an array.</span></div></li>
|
||||
<li><div class="src-line"><a name="a220"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a221"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$key </span></div></li>
|
||||
<li><div class="src-line"><a name="a222"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">mixed </span><span class="src-doc-var">$value </span></div></li>
|
||||
<li><div class="src-line"><a name="a223"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">mixed </span><span class="src-doc-var">$boost </span><span class="src-doc">Use false for default boost, else cast to float that should be > 0 or will be treated as false</span></div></li>
|
||||
<li><div class="src-line"><a name="a224"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a225"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Document.html#methodsetField">setField</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">, </span><span class="src-var">$value</span><span class="src-sym">, </span><span class="src-var">$boost </span>= <span class="src-id">false</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a226"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a227"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_fields">_fields</a><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">] </span>= <span class="src-var">$value</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a228"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#methodsetFieldBoost">setFieldBoost</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">, </span><span class="src-var">$boost</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a229"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a230"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a231"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a232"></a><span class="src-doc"> * Get the currently set field boost for a document field</span></div></li>
|
||||
<li><div class="src-line"><a name="a233"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a234"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$key </span></div></li>
|
||||
<li><div class="src-line"><a name="a235"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">float </span><span class="src-doc">currently set field boost, false if one is not set</span></div></li>
|
||||
<li><div class="src-line"><a name="a236"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a237"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Document.html#methodgetFieldBoost">getFieldBoost</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a238"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a239"></a> <span class="src-key">return </span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_fieldBoosts">_fieldBoosts</a><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">) </span>? <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_fieldBoosts">_fieldBoosts</a><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">] </span>: <span class="src-id">false</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a240"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a241"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a242"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a243"></a><span class="src-doc"> * Set the field boost for a document field</span></div></li>
|
||||
<li><div class="src-line"><a name="a244"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a245"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$key </span><span class="src-doc">field name for the boost</span></div></li>
|
||||
<li><div class="src-line"><a name="a246"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">mixed </span><span class="src-doc-var">$boost </span><span class="src-doc">Use false for default boost, else cast to float that should be > 0 or will be treated as false</span></div></li>
|
||||
<li><div class="src-line"><a name="a247"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a248"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Document.html#methodsetFieldBoost">setFieldBoost</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">, </span><span class="src-var">$boost</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a249"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a250"></a> <span class="src-var">$boost </span>= (float) <span class="src-var">$boost</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a251"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a252"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$boost </span>> <span class="src-num">0.0</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a253"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a254"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_fieldBoosts">_fieldBoosts</a><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">] </span>= <span class="src-var">$boost</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a255"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a256"></a> <span class="src-key">else</span></div></li>
|
||||
<li><div class="src-line"><a name="a257"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a258"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_fieldBoosts">_fieldBoosts</a><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">] </span>= <span class="src-id">false</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a259"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a260"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a261"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a262"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a263"></a><span class="src-doc"> * Return current field boosts, indexed by field name</span></div></li>
|
||||
<li><div class="src-line"><a name="a264"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a265"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">array </span></div></li>
|
||||
<li><div class="src-line"><a name="a266"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a267"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Document.html#methodgetFieldBoosts">getFieldBoosts</a><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a268"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a269"></a> <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_fieldBoosts">_fieldBoosts</a><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a270"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a271"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a272"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a273"></a><span class="src-doc"> * Get the names of all fields in this document</span></div></li>
|
||||
<li><div class="src-line"><a name="a274"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a275"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">array </span></div></li>
|
||||
<li><div class="src-line"><a name="a276"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a277"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Document.html#methodgetFieldNames">getFieldNames</a><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a278"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a279"></a> <span class="src-key">return </span><a href="http://www.php.net/array_keys">array_keys</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_fields">_fields</a><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a280"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a281"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a282"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a283"></a><span class="src-doc"> * Get the values of all fields in this document</span></div></li>
|
||||
<li><div class="src-line"><a name="a284"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a285"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">array </span></div></li>
|
||||
<li><div class="src-line"><a name="a286"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a287"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Document.html#methodgetFieldValues">getFieldValues</a><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a288"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a289"></a> <span class="src-key">return </span><a href="http://www.php.net/array_values">array_values</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_fields">_fields</a><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a290"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a291"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a292"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a293"></a><span class="src-doc"> * IteratorAggregate implementation function. Allows usage:</span></div></li>
|
||||
<li><div class="src-line"><a name="a294"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a295"></a><span class="src-doc"> * <code></span></div></li>
|
||||
<li><div class="src-line"><a name="a296"></a><span class="src-doc"> * foreach ($document as $key => $value)</span></div></li>
|
||||
<li><div class="src-line"><a name="a297"></a><span class="src-doc"> * {</span></div></li>
|
||||
<li><div class="src-line"><a name="a298"></a><span class="src-doc"> * ...</span></div></li>
|
||||
<li><div class="src-line"><a name="a299"></a><span class="src-doc"> * }</span></div></li>
|
||||
<li><div class="src-line"><a name="a300"></a><span class="src-doc"> * </code></span></div></li>
|
||||
<li><div class="src-line"><a name="a301"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a302"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Document.html#methodgetIterator">getIterator</a><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a303"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a304"></a> <span class="src-var">$arrayObject </span>= <span class="src-key">new </span><span class="src-id">ArrayObject</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_fields">_fields</a><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a305"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a306"></a> <span class="src-key">return </span><span class="src-var">$arrayObject</span><span class="src-sym">-></span><span class="src-id">getIterator</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a307"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a308"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a309"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a310"></a><span class="src-doc"> * Magic get for field values</span></div></li>
|
||||
<li><div class="src-line"><a name="a311"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a312"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$key </span></div></li>
|
||||
<li><div class="src-line"><a name="a313"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">mixed </span></div></li>
|
||||
<li><div class="src-line"><a name="a314"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a315"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Document.html#method__get">__get</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a316"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a317"></a> <span class="src-key">if </span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_fields">_fields</a><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">))</span></div></li>
|
||||
<li><div class="src-line"><a name="a318"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a319"></a> <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_fields">_fields</a><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a320"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a321"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a322"></a> <span class="src-key">return </span><span class="src-id">null</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a323"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a324"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a325"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a326"></a><span class="src-doc"> * Magic set for field values. Multi-valued fields should be set as arrays</span></div></li>
|
||||
<li><div class="src-line"><a name="a327"></a><span class="src-doc"> * or instead use the addField(...) function which will automatically</span></div></li>
|
||||
<li><div class="src-line"><a name="a328"></a><span class="src-doc"> * make sure the field is an array.</span></div></li>
|
||||
<li><div class="src-line"><a name="a329"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a330"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$key </span></div></li>
|
||||
<li><div class="src-line"><a name="a331"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">mixed </span><span class="src-doc-var">$value </span></div></li>
|
||||
<li><div class="src-line"><a name="a332"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a333"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Document.html#method__set">__set</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">, </span><span class="src-var">$value</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a334"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a335"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#methodsetField">setField</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">, </span><span class="src-var">$value</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a336"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a337"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a338"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a339"></a><span class="src-doc"> * Magic isset for fields values. Do not call directly. Allows usage:</span></div></li>
|
||||
<li><div class="src-line"><a name="a340"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a341"></a><span class="src-doc"> * <code></span></div></li>
|
||||
<li><div class="src-line"><a name="a342"></a><span class="src-doc"> * isset($document->some_field);</span></div></li>
|
||||
<li><div class="src-line"><a name="a343"></a><span class="src-doc"> * </code></span></div></li>
|
||||
<li><div class="src-line"><a name="a344"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a345"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$key </span></div></li>
|
||||
<li><div class="src-line"><a name="a346"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">boolean </span></div></li>
|
||||
<li><div class="src-line"><a name="a347"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a348"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Document.html#method__isset">__isset</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a349"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a350"></a> <span class="src-key">return </span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_fields">_fields</a><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a351"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a352"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a353"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a354"></a><span class="src-doc"> * Magic unset for field values. Do not call directly. Allows usage:</span></div></li>
|
||||
<li><div class="src-line"><a name="a355"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a356"></a><span class="src-doc"> * <code></span></div></li>
|
||||
<li><div class="src-line"><a name="a357"></a><span class="src-doc"> * unset($document->some_field);</span></div></li>
|
||||
<li><div class="src-line"><a name="a358"></a><span class="src-doc"> * </code></span></div></li>
|
||||
<li><div class="src-line"><a name="a359"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a360"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$key </span></div></li>
|
||||
<li><div class="src-line"><a name="a361"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a362"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Document.html#method__unset">__unset</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a363"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a364"></a> unset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_fields">_fields</a><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a365"></a> unset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Document.html#var$_fieldBoosts">_fieldBoosts</a><span class="src-sym">[</span><span class="src-var">$key</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a366"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a367"></a><span class="src-sym">}</span></div></li>
|
||||
</ol></div>
|
||||
</div>
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:13 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>File Source for Exception.php</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Source for file Exception.php</h1>
|
||||
<p>Documentation is available at <a href="../Apache/Solr/_Exception.php.html">Exception.php</a></p>
|
||||
<div class="src-code">
|
||||
<div class="src-code"><ol><li><div class="src-line"><a name="a1"></a><span class="src-php"><?php</span></div></li>
|
||||
<li><div class="src-line"><a name="a2"></a><span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a3"></a><span class="src-doc"> * Copyright (c) 2007-2011, Servigistics, Inc.</span></div></li>
|
||||
<li><div class="src-line"><a name="a4"></a><span class="src-doc"> * All rights reserved.</span></div></li>
|
||||
<li><div class="src-line"><a name="a5"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a6"></a><span class="src-doc"> * Redistribution and use in source and binary forms, with or without</span></div></li>
|
||||
<li><div class="src-line"><a name="a7"></a><span class="src-doc"> * modification, are permitted provided that the following conditions are met:</span></div></li>
|
||||
<li><div class="src-line"><a name="a8"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a9"></a><span class="src-doc"> * - Redistributions of source code must retain the above copyright notice,</span></div></li>
|
||||
<li><div class="src-line"><a name="a10"></a><span class="src-doc"> * this list of conditions and the following disclaimer.</span></div></li>
|
||||
<li><div class="src-line"><a name="a11"></a><span class="src-doc"> * - Redistributions in binary form must reproduce the above copyright</span></div></li>
|
||||
<li><div class="src-line"><a name="a12"></a><span class="src-doc"> * notice, this list of conditions and the following disclaimer in the</span></div></li>
|
||||
<li><div class="src-line"><a name="a13"></a><span class="src-doc"> * documentation and/or other materials provided with the distribution.</span></div></li>
|
||||
<li><div class="src-line"><a name="a14"></a><span class="src-doc"> * - Neither the name of Servigistics, Inc. nor the names of</span></div></li>
|
||||
<li><div class="src-line"><a name="a15"></a><span class="src-doc"> * its contributors may be used to endorse or promote products derived from</span></div></li>
|
||||
<li><div class="src-line"><a name="a16"></a><span class="src-doc"> * this software without specific prior written permission.</span></div></li>
|
||||
<li><div class="src-line"><a name="a17"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a18"></a><span class="src-doc"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"</span></div></li>
|
||||
<li><div class="src-line"><a name="a19"></a><span class="src-doc"> * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div></li>
|
||||
<li><div class="src-line"><a name="a20"></a><span class="src-doc"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div></li>
|
||||
<li><div class="src-line"><a name="a21"></a><span class="src-doc"> * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE</span></div></li>
|
||||
<li><div class="src-line"><a name="a22"></a><span class="src-doc"> * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div></li>
|
||||
<li><div class="src-line"><a name="a23"></a><span class="src-doc"> * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div></li>
|
||||
<li><div class="src-line"><a name="a24"></a><span class="src-doc"> * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div></li>
|
||||
<li><div class="src-line"><a name="a25"></a><span class="src-doc"> * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div></li>
|
||||
<li><div class="src-line"><a name="a26"></a><span class="src-doc"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div></li>
|
||||
<li><div class="src-line"><a name="a27"></a><span class="src-doc"> * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div></li>
|
||||
<li><div class="src-line"><a name="a28"></a><span class="src-doc"> * POSSIBILITY OF SUCH DAMAGE.</span></div></li>
|
||||
<li><div class="src-line"><a name="a29"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a30"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@copyright</span><span class="src-doc"> Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)</span></div></li>
|
||||
<li><div class="src-line"><a name="a31"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@license</span><span class="src-doc"> http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD</span></div></li>
|
||||
<li><div class="src-line"><a name="a32"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> $Id: Exception.php 54 2011-02-04 16:29:18Z donovan.jimenez $</span></div></li>
|
||||
<li><div class="src-line"><a name="a33"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a34"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@package</span><span class="src-doc"> Apache</span></div></li>
|
||||
<li><div class="src-line"><a name="a35"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@subpackage</span><span class="src-doc"> Solr</span></div></li>
|
||||
<li><div class="src-line"><a name="a36"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@author</span><span class="src-doc"> Donovan Jimenez <djimenez@conduit-it.com></span></div></li>
|
||||
<li><div class="src-line"><a name="a37"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a38"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a39"></a><span class="src-key">class </span><a href="../Apache/Solr/Apache_Solr_Exception.html">Apache_Solr_Exception</a> <span class="src-key">extends </span><span class="src-id">Exception</span></div></li>
|
||||
<li><div class="src-line"><a name="a40"></a><span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a41"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a42"></a><span class="src-doc"> * SVN Revision meta data for this class</span></div></li>
|
||||
<li><div class="src-line"><a name="a43"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a44"></a> <span class="src-key">const </span><a href="../Apache/Solr/Apache_Solr_Exception.html#constSVN_REVISION">SVN_REVISION</a> = <span class="src-str">'$Revision: 54 $'</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a45"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a46"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a47"></a><span class="src-doc"> * SVN ID meta data for this class</span></div></li>
|
||||
<li><div class="src-line"><a name="a48"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a49"></a> <span class="src-key">const </span><a href="../Apache/Solr/Apache_Solr_Exception.html#constSVN_ID">SVN_ID</a> = <span class="src-str">'$Id: Exception.php 54 2011-02-04 16:29:18Z donovan.jimenez $'</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a50"></a><span class="src-sym">}</span></div></li>
|
||||
</ol></div>
|
||||
</div>
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:13 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>File Source for Abstract.php</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Source for file Abstract.php</h1>
|
||||
<p>Documentation is available at <a href="../Apache/Solr/_HttpTransport---Abstract.php.html">Abstract.php</a></p>
|
||||
<div class="src-code">
|
||||
<div class="src-code"><ol><li><div class="src-line"><a name="a1"></a><span class="src-php"><?php</span></div></li>
|
||||
<li><div class="src-line"><a name="a2"></a><span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a3"></a><span class="src-doc"> * Copyright (c) 2007-2011, Servigistics, Inc.</span></div></li>
|
||||
<li><div class="src-line"><a name="a4"></a><span class="src-doc"> * All rights reserved.</span></div></li>
|
||||
<li><div class="src-line"><a name="a5"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a6"></a><span class="src-doc"> * Redistribution and use in source and binary forms, with or without</span></div></li>
|
||||
<li><div class="src-line"><a name="a7"></a><span class="src-doc"> * modification, are permitted provided that the following conditions are met:</span></div></li>
|
||||
<li><div class="src-line"><a name="a8"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a9"></a><span class="src-doc"> * - Redistributions of source code must retain the above copyright notice,</span></div></li>
|
||||
<li><div class="src-line"><a name="a10"></a><span class="src-doc"> * this list of conditions and the following disclaimer.</span></div></li>
|
||||
<li><div class="src-line"><a name="a11"></a><span class="src-doc"> * - Redistributions in binary form must reproduce the above copyright</span></div></li>
|
||||
<li><div class="src-line"><a name="a12"></a><span class="src-doc"> * notice, this list of conditions and the following disclaimer in the</span></div></li>
|
||||
<li><div class="src-line"><a name="a13"></a><span class="src-doc"> * documentation and/or other materials provided with the distribution.</span></div></li>
|
||||
<li><div class="src-line"><a name="a14"></a><span class="src-doc"> * - Neither the name of Servigistics, Inc. nor the names of</span></div></li>
|
||||
<li><div class="src-line"><a name="a15"></a><span class="src-doc"> * its contributors may be used to endorse or promote products derived from</span></div></li>
|
||||
<li><div class="src-line"><a name="a16"></a><span class="src-doc"> * this software without specific prior written permission.</span></div></li>
|
||||
<li><div class="src-line"><a name="a17"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a18"></a><span class="src-doc"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"</span></div></li>
|
||||
<li><div class="src-line"><a name="a19"></a><span class="src-doc"> * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div></li>
|
||||
<li><div class="src-line"><a name="a20"></a><span class="src-doc"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div></li>
|
||||
<li><div class="src-line"><a name="a21"></a><span class="src-doc"> * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE</span></div></li>
|
||||
<li><div class="src-line"><a name="a22"></a><span class="src-doc"> * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div></li>
|
||||
<li><div class="src-line"><a name="a23"></a><span class="src-doc"> * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div></li>
|
||||
<li><div class="src-line"><a name="a24"></a><span class="src-doc"> * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div></li>
|
||||
<li><div class="src-line"><a name="a25"></a><span class="src-doc"> * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div></li>
|
||||
<li><div class="src-line"><a name="a26"></a><span class="src-doc"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div></li>
|
||||
<li><div class="src-line"><a name="a27"></a><span class="src-doc"> * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div></li>
|
||||
<li><div class="src-line"><a name="a28"></a><span class="src-doc"> * POSSIBILITY OF SUCH DAMAGE.</span></div></li>
|
||||
<li><div class="src-line"><a name="a29"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a30"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@copyright</span><span class="src-doc"> Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)</span></div></li>
|
||||
<li><div class="src-line"><a name="a31"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@license</span><span class="src-doc"> http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD</span></div></li>
|
||||
<li><div class="src-line"><a name="a32"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> $Id: $</span></div></li>
|
||||
<li><div class="src-line"><a name="a33"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a34"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@package</span><span class="src-doc"> Apache</span></div></li>
|
||||
<li><div class="src-line"><a name="a35"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@subpackage</span><span class="src-doc"> Solr</span></div></li>
|
||||
<li><div class="src-line"><a name="a36"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@author</span><span class="src-doc"> Timo Schmidt <timo.schmidt@aoemedia.de>, Donovan Jimenez <djimenez@conduit-it.com></span></div></li>
|
||||
<li><div class="src-line"><a name="a37"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a38"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a39"></a><span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a40"></a><span class="src-doc"> * Convenience class that implements the transport implementation. Can be extended by</span></div></li>
|
||||
<li><div class="src-line"><a name="a41"></a><span class="src-doc"> * real implementations to do some of the common book keeping</span></div></li>
|
||||
<li><div class="src-line"><a name="a42"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a43"></a><span class="src-key">abstract </span><span class="src-key">class </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Abstract.html">Apache_Solr_HttpTransport_Abstract</a> <span class="src-key">implements </span><span class="src-id">Apache_Solr_HttpTransport_Interface</span></div></li>
|
||||
<li><div class="src-line"><a name="a44"></a><span class="src-sym">{ </span></div></li>
|
||||
<li><div class="src-line"><a name="a45"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a46"></a><span class="src-doc"> * Our default timeout value for requests that don't specify a timeout</span></div></li>
|
||||
<li><div class="src-line"><a name="a47"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a48"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">float </span></div></li>
|
||||
<li><div class="src-line"><a name="a49"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a50"></a> <span class="src-key">private </span><span class="src-var">$_defaultTimeout </span>= <span class="src-id">false</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a51"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a52"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a53"></a><span class="src-doc"> * Get the current default timeout setting (initially the default_socket_timeout ini setting)</span></div></li>
|
||||
<li><div class="src-line"><a name="a54"></a><span class="src-doc"> * in seconds</span></div></li>
|
||||
<li><div class="src-line"><a name="a55"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a56"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">float </span></div></li>
|
||||
<li><div class="src-line"><a name="a57"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a58"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Abstract.html#methodgetDefaultTimeout">getDefaultTimeout</a><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a59"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a60"></a> <span class="src-comm">// lazy load the default timeout from the ini settings</span></div></li>
|
||||
<li><div class="src-line"><a name="a61"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_defaultTimeout </span>=== <span class="src-id">false</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a62"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a63"></a> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_defaultTimeout </span>= (int) <a href="http://www.php.net/ini_get">ini_get</a><span class="src-sym">(</span><span class="src-str">'default_socket_timeout'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a64"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a65"></a> <span class="src-comm">// double check we didn't get 0 for a timeout</span></div></li>
|
||||
<li><div class="src-line"><a name="a66"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_defaultTimeout </span><= <span class="src-num">0</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a67"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a68"></a> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_defaultTimeout </span>= <span class="src-num">60</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a69"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a70"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a71"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a72"></a> <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_defaultTimeout</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a73"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a74"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a75"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a76"></a><span class="src-doc"> * Set the current default timeout for all HTTP requests</span></div></li>
|
||||
<li><div class="src-line"><a name="a77"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a78"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">float </span><span class="src-doc-var">$timeout </span></div></li>
|
||||
<li><div class="src-line"><a name="a79"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a80"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Abstract.html#methodsetDefaultTimeout">setDefaultTimeout</a><span class="src-sym">(</span><span class="src-var">$timeout</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a81"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a82"></a> <span class="src-var">$timeout </span>= (float) <span class="src-var">$timeout</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a83"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a84"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$timeout </span>>= <span class="src-num">0</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a85"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a86"></a> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_defaultTimeout </span>= <span class="src-var">$timeout</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a87"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a88"></a> <span class="src-sym">} </span></div></li>
|
||||
<li><div class="src-line"><a name="a89"></a><span class="src-sym">}</span></div></li>
|
||||
</ol></div>
|
||||
</div>
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:08 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,218 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>File Source for Curl.php</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Source for file Curl.php</h1>
|
||||
<p>Documentation is available at <a href="../Apache/Solr/_HttpTransport---Curl.php.html">Curl.php</a></p>
|
||||
<div class="src-code">
|
||||
<div class="src-code"><ol><li><div class="src-line"><a name="a1"></a><span class="src-php"><?php</span></div></li>
|
||||
<li><div class="src-line"><a name="a2"></a><span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a3"></a><span class="src-doc"> * Copyright (c) 2007-2011, Servigistics, Inc.</span></div></li>
|
||||
<li><div class="src-line"><a name="a4"></a><span class="src-doc"> * All rights reserved.</span></div></li>
|
||||
<li><div class="src-line"><a name="a5"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a6"></a><span class="src-doc"> * Redistribution and use in source and binary forms, with or without</span></div></li>
|
||||
<li><div class="src-line"><a name="a7"></a><span class="src-doc"> * modification, are permitted provided that the following conditions are met:</span></div></li>
|
||||
<li><div class="src-line"><a name="a8"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a9"></a><span class="src-doc"> * - Redistributions of source code must retain the above copyright notice,</span></div></li>
|
||||
<li><div class="src-line"><a name="a10"></a><span class="src-doc"> * this list of conditions and the following disclaimer.</span></div></li>
|
||||
<li><div class="src-line"><a name="a11"></a><span class="src-doc"> * - Redistributions in binary form must reproduce the above copyright</span></div></li>
|
||||
<li><div class="src-line"><a name="a12"></a><span class="src-doc"> * notice, this list of conditions and the following disclaimer in the</span></div></li>
|
||||
<li><div class="src-line"><a name="a13"></a><span class="src-doc"> * documentation and/or other materials provided with the distribution.</span></div></li>
|
||||
<li><div class="src-line"><a name="a14"></a><span class="src-doc"> * - Neither the name of Servigistics, Inc. nor the names of</span></div></li>
|
||||
<li><div class="src-line"><a name="a15"></a><span class="src-doc"> * its contributors may be used to endorse or promote products derived from</span></div></li>
|
||||
<li><div class="src-line"><a name="a16"></a><span class="src-doc"> * this software without specific prior written permission.</span></div></li>
|
||||
<li><div class="src-line"><a name="a17"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a18"></a><span class="src-doc"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"</span></div></li>
|
||||
<li><div class="src-line"><a name="a19"></a><span class="src-doc"> * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div></li>
|
||||
<li><div class="src-line"><a name="a20"></a><span class="src-doc"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div></li>
|
||||
<li><div class="src-line"><a name="a21"></a><span class="src-doc"> * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE</span></div></li>
|
||||
<li><div class="src-line"><a name="a22"></a><span class="src-doc"> * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div></li>
|
||||
<li><div class="src-line"><a name="a23"></a><span class="src-doc"> * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div></li>
|
||||
<li><div class="src-line"><a name="a24"></a><span class="src-doc"> * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div></li>
|
||||
<li><div class="src-line"><a name="a25"></a><span class="src-doc"> * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div></li>
|
||||
<li><div class="src-line"><a name="a26"></a><span class="src-doc"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div></li>
|
||||
<li><div class="src-line"><a name="a27"></a><span class="src-doc"> * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div></li>
|
||||
<li><div class="src-line"><a name="a28"></a><span class="src-doc"> * POSSIBILITY OF SUCH DAMAGE.</span></div></li>
|
||||
<li><div class="src-line"><a name="a29"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a30"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@copyright</span><span class="src-doc"> Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)</span></div></li>
|
||||
<li><div class="src-line"><a name="a31"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@license</span><span class="src-doc"> http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD</span></div></li>
|
||||
<li><div class="src-line"><a name="a32"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> $Id: $</span></div></li>
|
||||
<li><div class="src-line"><a name="a33"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a34"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@package</span><span class="src-doc"> Apache</span></div></li>
|
||||
<li><div class="src-line"><a name="a35"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@subpackage</span><span class="src-doc"> Solr</span></div></li>
|
||||
<li><div class="src-line"><a name="a36"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@author</span><span class="src-doc"> Timo Schmidt <timo.schmidt@aoemedia.de>, Donovan Jimenez <djimenez@conduit-it.com></span></div></li>
|
||||
<li><div class="src-line"><a name="a37"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a38"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a39"></a><span class="src-comm">// Require Apache_Solr_HttpTransport_Abstract</span></div></li>
|
||||
<li><div class="src-line"><a name="a40"></a><span class="src-inc">require_once</span><span class="src-sym">(</span><span class="src-id">dirname</span><span class="src-sym">(</span>__FILE__<span class="src-sym">) </span>. <span class="src-str">'/Abstract.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a41"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a42"></a><span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a43"></a><span class="src-doc"> * A Curl based HTTP transport. Uses a single curl session for all requests.</span></div></li>
|
||||
<li><div class="src-line"><a name="a44"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a45"></a><span class="src-key">class </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Curl.html">Apache_Solr_HttpTransport_Curl</a> <span class="src-key">extends </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Abstract.html">Apache_Solr_HttpTransport_Abstract</a></div></li>
|
||||
<li><div class="src-line"><a name="a46"></a><span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a47"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a48"></a><span class="src-doc"> * SVN Revision meta data for this class</span></div></li>
|
||||
<li><div class="src-line"><a name="a49"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a50"></a> <span class="src-key">const </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Curl.html#constSVN_REVISION">SVN_REVISION</a> = <span class="src-str">'$Revision:$'</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a51"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a52"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a53"></a><span class="src-doc"> * SVN ID meta data for this class</span></div></li>
|
||||
<li><div class="src-line"><a name="a54"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a55"></a> <span class="src-key">const </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Curl.html#constSVN_ID">SVN_ID</a> = <span class="src-str">'$Id:$'</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a56"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a57"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a58"></a><span class="src-doc"> * Curl Session Handle</span></div></li>
|
||||
<li><div class="src-line"><a name="a59"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a60"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">resource </span></div></li>
|
||||
<li><div class="src-line"><a name="a61"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a62"></a> <span class="src-key">private </span><span class="src-var">$_curl</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a63"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a64"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a65"></a><span class="src-doc"> * Initializes a curl session</span></div></li>
|
||||
<li><div class="src-line"><a name="a66"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a67"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Curl.html#method__construct">__construct</a><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a68"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a69"></a> <span class="src-comm">// initialize a CURL session</span></div></li>
|
||||
<li><div class="src-line"><a name="a70"></a> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_curl </span>= <a href="http://www.php.net/curl_init">curl_init</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a71"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a72"></a> <span class="src-comm">// set common options that will not be changed during the session</span></div></li>
|
||||
<li><div class="src-line"><a name="a73"></a> <a href="http://www.php.net/curl_setopt_array">curl_setopt_array</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_curl</span><span class="src-sym">, </span><span class="src-key">array</span><span class="src-sym">(</span></div></li>
|
||||
<li><div class="src-line"><a name="a74"></a> <span class="src-comm">// return the response body from curl_exec</span></div></li>
|
||||
<li><div class="src-line"><a name="a75"></a> <span class="src-id">CURLOPT_RETURNTRANSFER </span>=> <span class="src-id">true</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a76"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a77"></a> <span class="src-comm">// get the output as binary data</span></div></li>
|
||||
<li><div class="src-line"><a name="a78"></a> <span class="src-id">CURLOPT_BINARYTRANSFER </span>=> <span class="src-id">true</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a79"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a80"></a> <span class="src-comm">// we do not need the headers in the output, we get everything we need from curl_getinfo</span></div></li>
|
||||
<li><div class="src-line"><a name="a81"></a> <span class="src-id">CURLOPT_HEADER </span>=> <span class="src-id">false</span></div></li>
|
||||
<li><div class="src-line"><a name="a82"></a> <span class="src-sym">))</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a83"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a84"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a85"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a86"></a><span class="src-doc"> * Closes a curl session</span></div></li>
|
||||
<li><div class="src-line"><a name="a87"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a88"></a> <span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Curl.html#method__destruct">__destruct</a><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a89"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a90"></a> <span class="src-comm">// close our curl session</span></div></li>
|
||||
<li><div class="src-line"><a name="a91"></a> <a href="http://www.php.net/curl_close">curl_close</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_curl</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a92"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a93"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a94"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Curl.html#methodperformGetRequest">performGetRequest</a><span class="src-sym">(</span><span class="src-var">$url</span><span class="src-sym">, </span><span class="src-var">$timeout </span>= <span class="src-id">false</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a95"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a96"></a> <span class="src-comm">// check the timeout value</span></div></li>
|
||||
<li><div class="src-line"><a name="a97"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$timeout </span>=== <span class="src-id">false </span>|| <span class="src-var">$timeout </span><= <span class="src-num">0.0</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a98"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a99"></a> <span class="src-comm">// use the default timeout</span></div></li>
|
||||
<li><div class="src-line"><a name="a100"></a> <span class="src-var">$timeout </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Abstract.html#methodgetDefaultTimeout">getDefaultTimeout</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a101"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a102"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a103"></a> <span class="src-comm">// set curl GET options</span></div></li>
|
||||
<li><div class="src-line"><a name="a104"></a> <a href="http://www.php.net/curl_setopt_array">curl_setopt_array</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_curl</span><span class="src-sym">, </span><span class="src-key">array</span><span class="src-sym">(</span></div></li>
|
||||
<li><div class="src-line"><a name="a105"></a> <span class="src-comm">// make sure we're returning the body</span></div></li>
|
||||
<li><div class="src-line"><a name="a106"></a> <span class="src-id">CURLOPT_NOBODY </span>=> <span class="src-id">false</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a107"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a108"></a> <span class="src-comm">// make sure we're GET</span></div></li>
|
||||
<li><div class="src-line"><a name="a109"></a> <span class="src-id">CURLOPT_HTTPGET </span>=> <span class="src-id">true</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a110"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a111"></a> <span class="src-comm">// set the URL</span></div></li>
|
||||
<li><div class="src-line"><a name="a112"></a> <span class="src-id">CURLOPT_URL </span>=> <span class="src-var">$url</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a113"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a114"></a> <span class="src-comm">// set the timeout</span></div></li>
|
||||
<li><div class="src-line"><a name="a115"></a> <span class="src-id">CURLOPT_TIMEOUT </span>=> <span class="src-var">$timeout</span></div></li>
|
||||
<li><div class="src-line"><a name="a116"></a> <span class="src-sym">))</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a117"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a118"></a> <span class="src-comm">// make the request</span></div></li>
|
||||
<li><div class="src-line"><a name="a119"></a> <span class="src-var">$responseBody </span>= <a href="http://www.php.net/curl_exec">curl_exec</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_curl</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a120"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a121"></a> <span class="src-comm">// get info from the transfer</span></div></li>
|
||||
<li><div class="src-line"><a name="a122"></a> <span class="src-var">$statusCode </span>= <a href="http://www.php.net/curl_getinfo">curl_getinfo</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_curl</span><span class="src-sym">, </span><span class="src-id">CURLINFO_HTTP_CODE</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a123"></a> <span class="src-var">$contentType </span>= <a href="http://www.php.net/curl_getinfo">curl_getinfo</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_curl</span><span class="src-sym">, </span><span class="src-id">CURLINFO_CONTENT_TYPE</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a124"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a125"></a> <span class="src-key">return </span><span class="src-key">new </span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_HttpTransport_Response.html">Apache_Solr_HttpTransport_Response</a></span><span class="src-sym">(</span><span class="src-var">$statusCode</span><span class="src-sym">, </span><span class="src-var">$contentType</span><span class="src-sym">, </span><span class="src-var">$responseBody</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a126"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a127"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a128"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Curl.html#methodperformHeadRequest">performHeadRequest</a><span class="src-sym">(</span><span class="src-var">$url</span><span class="src-sym">, </span><span class="src-var">$timeout </span>= <span class="src-id">false</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a129"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a130"></a> <span class="src-comm">// check the timeout value</span></div></li>
|
||||
<li><div class="src-line"><a name="a131"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$timeout </span>=== <span class="src-id">false </span>|| <span class="src-var">$timeout </span><= <span class="src-num">0.0</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a132"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a133"></a> <span class="src-comm">// use the default timeout</span></div></li>
|
||||
<li><div class="src-line"><a name="a134"></a> <span class="src-var">$timeout </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Abstract.html#methodgetDefaultTimeout">getDefaultTimeout</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a135"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a136"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a137"></a> <span class="src-comm">// set curl HEAD options</span></div></li>
|
||||
<li><div class="src-line"><a name="a138"></a> <a href="http://www.php.net/curl_setopt_array">curl_setopt_array</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_curl</span><span class="src-sym">, </span><span class="src-key">array</span><span class="src-sym">(</span></div></li>
|
||||
<li><div class="src-line"><a name="a139"></a> <span class="src-comm">// this both sets the method to HEAD and says not to return a body</span></div></li>
|
||||
<li><div class="src-line"><a name="a140"></a> <span class="src-id">CURLOPT_NOBODY </span>=> <span class="src-id">true</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a141"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a142"></a> <span class="src-comm">// set the URL</span></div></li>
|
||||
<li><div class="src-line"><a name="a143"></a> <span class="src-id">CURLOPT_URL </span>=> <span class="src-var">$url</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a144"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a145"></a> <span class="src-comm">// set the timeout</span></div></li>
|
||||
<li><div class="src-line"><a name="a146"></a> <span class="src-id">CURLOPT_TIMEOUT </span>=> <span class="src-var">$timeout</span></div></li>
|
||||
<li><div class="src-line"><a name="a147"></a> <span class="src-sym">))</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a148"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a149"></a> <span class="src-comm">// make the request</span></div></li>
|
||||
<li><div class="src-line"><a name="a150"></a> <span class="src-var">$responseBody </span>= <a href="http://www.php.net/curl_exec">curl_exec</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_curl</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a151"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a152"></a> <span class="src-comm">// get info from the transfer</span></div></li>
|
||||
<li><div class="src-line"><a name="a153"></a> <span class="src-var">$statusCode </span>= <a href="http://www.php.net/curl_getinfo">curl_getinfo</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_curl</span><span class="src-sym">, </span><span class="src-id">CURLINFO_HTTP_CODE</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a154"></a> <span class="src-var">$contentType </span>= <a href="http://www.php.net/curl_getinfo">curl_getinfo</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_curl</span><span class="src-sym">, </span><span class="src-id">CURLINFO_CONTENT_TYPE</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a155"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a156"></a> <span class="src-key">return </span><span class="src-key">new </span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_HttpTransport_Response.html">Apache_Solr_HttpTransport_Response</a></span><span class="src-sym">(</span><span class="src-var">$statusCode</span><span class="src-sym">, </span><span class="src-var">$contentType</span><span class="src-sym">, </span><span class="src-var">$responseBody</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a157"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a158"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a159"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Curl.html#methodperformPostRequest">performPostRequest</a><span class="src-sym">(</span><span class="src-var">$url</span><span class="src-sym">, </span><span class="src-var">$postData</span><span class="src-sym">, </span><span class="src-var">$contentType</span><span class="src-sym">, </span><span class="src-var">$timeout </span>= <span class="src-id">false</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a160"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a161"></a> <span class="src-comm">// check the timeout value</span></div></li>
|
||||
<li><div class="src-line"><a name="a162"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$timeout </span>=== <span class="src-id">false </span>|| <span class="src-var">$timeout </span><= <span class="src-num">0.0</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a163"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a164"></a> <span class="src-comm">// use the default timeout</span></div></li>
|
||||
<li><div class="src-line"><a name="a165"></a> <span class="src-var">$timeout </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Abstract.html#methodgetDefaultTimeout">getDefaultTimeout</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a166"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a167"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a168"></a> <span class="src-comm">// set curl POST options</span></div></li>
|
||||
<li><div class="src-line"><a name="a169"></a> <a href="http://www.php.net/curl_setopt_array">curl_setopt_array</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_curl</span><span class="src-sym">, </span><span class="src-key">array</span><span class="src-sym">(</span></div></li>
|
||||
<li><div class="src-line"><a name="a170"></a> <span class="src-comm">// make sure we're returning the body</span></div></li>
|
||||
<li><div class="src-line"><a name="a171"></a> <span class="src-id">CURLOPT_NOBODY </span>=> <span class="src-id">false</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a172"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a173"></a> <span class="src-comm">// make sure we're POST</span></div></li>
|
||||
<li><div class="src-line"><a name="a174"></a> <span class="src-id">CURLOPT_POST </span>=> <span class="src-id">true</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a175"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a176"></a> <span class="src-comm">// set the URL</span></div></li>
|
||||
<li><div class="src-line"><a name="a177"></a> <span class="src-id">CURLOPT_URL </span>=> <span class="src-var">$url</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a178"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a179"></a> <span class="src-comm">// set the post data</span></div></li>
|
||||
<li><div class="src-line"><a name="a180"></a> <span class="src-id">CURLOPT_POSTFIELDS </span>=> <span class="src-var">$postData</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a181"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a182"></a> <span class="src-comm">// set the content type</span></div></li>
|
||||
<li><div class="src-line"><a name="a183"></a> <span class="src-id">CURLOPT_HTTPHEADER </span>=> <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">"</span><span class="src-str">Content-Type: {<span class="src-var">$contentType</span><span class="src-sym">}</span></span><span class="src-str">"</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a184"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a185"></a> <span class="src-comm">// set the timeout</span></div></li>
|
||||
<li><div class="src-line"><a name="a186"></a> <span class="src-id">CURLOPT_TIMEOUT </span>=> <span class="src-var">$timeout</span></div></li>
|
||||
<li><div class="src-line"><a name="a187"></a> <span class="src-sym">))</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a188"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a189"></a> <span class="src-comm">// make the request</span></div></li>
|
||||
<li><div class="src-line"><a name="a190"></a> <span class="src-var">$responseBody </span>= <a href="http://www.php.net/curl_exec">curl_exec</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_curl</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a191"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a192"></a> <span class="src-comm">// get info from the transfer</span></div></li>
|
||||
<li><div class="src-line"><a name="a193"></a> <span class="src-var">$statusCode </span>= <a href="http://www.php.net/curl_getinfo">curl_getinfo</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_curl</span><span class="src-sym">, </span><span class="src-id">CURLINFO_HTTP_CODE</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a194"></a> <span class="src-var">$contentType </span>= <a href="http://www.php.net/curl_getinfo">curl_getinfo</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_curl</span><span class="src-sym">, </span><span class="src-id">CURLINFO_CONTENT_TYPE</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a195"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a196"></a> <span class="src-key">return </span><span class="src-key">new </span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_HttpTransport_Response.html">Apache_Solr_HttpTransport_Response</a></span><span class="src-sym">(</span><span class="src-var">$statusCode</span><span class="src-sym">, </span><span class="src-var">$contentType</span><span class="src-sym">, </span><span class="src-var">$responseBody</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a197"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a198"></a><span class="src-sym">}</span></div></li>
|
||||
</ol></div>
|
||||
</div>
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:12 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,216 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>File Source for CurlNoReuse.php</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Source for file CurlNoReuse.php</h1>
|
||||
<p>Documentation is available at <a href="../Apache/Solr/_HttpTransport---CurlNoReuse.php.html">CurlNoReuse.php</a></p>
|
||||
<div class="src-code">
|
||||
<div class="src-code"><ol><li><div class="src-line"><a name="a1"></a><span class="src-php"><?php</span></div></li>
|
||||
<li><div class="src-line"><a name="a2"></a><span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a3"></a><span class="src-doc"> * Copyright (c) 2007-2011, Servigistics, Inc.</span></div></li>
|
||||
<li><div class="src-line"><a name="a4"></a><span class="src-doc"> * All rights reserved.</span></div></li>
|
||||
<li><div class="src-line"><a name="a5"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a6"></a><span class="src-doc"> * Redistribution and use in source and binary forms, with or without</span></div></li>
|
||||
<li><div class="src-line"><a name="a7"></a><span class="src-doc"> * modification, are permitted provided that the following conditions are met:</span></div></li>
|
||||
<li><div class="src-line"><a name="a8"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a9"></a><span class="src-doc"> * - Redistributions of source code must retain the above copyright notice,</span></div></li>
|
||||
<li><div class="src-line"><a name="a10"></a><span class="src-doc"> * this list of conditions and the following disclaimer.</span></div></li>
|
||||
<li><div class="src-line"><a name="a11"></a><span class="src-doc"> * - Redistributions in binary form must reproduce the above copyright</span></div></li>
|
||||
<li><div class="src-line"><a name="a12"></a><span class="src-doc"> * notice, this list of conditions and the following disclaimer in the</span></div></li>
|
||||
<li><div class="src-line"><a name="a13"></a><span class="src-doc"> * documentation and/or other materials provided with the distribution.</span></div></li>
|
||||
<li><div class="src-line"><a name="a14"></a><span class="src-doc"> * - Neither the name of Servigistics, Inc. nor the names of</span></div></li>
|
||||
<li><div class="src-line"><a name="a15"></a><span class="src-doc"> * its contributors may be used to endorse or promote products derived from</span></div></li>
|
||||
<li><div class="src-line"><a name="a16"></a><span class="src-doc"> * this software without specific prior written permission.</span></div></li>
|
||||
<li><div class="src-line"><a name="a17"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a18"></a><span class="src-doc"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"</span></div></li>
|
||||
<li><div class="src-line"><a name="a19"></a><span class="src-doc"> * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div></li>
|
||||
<li><div class="src-line"><a name="a20"></a><span class="src-doc"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div></li>
|
||||
<li><div class="src-line"><a name="a21"></a><span class="src-doc"> * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE</span></div></li>
|
||||
<li><div class="src-line"><a name="a22"></a><span class="src-doc"> * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div></li>
|
||||
<li><div class="src-line"><a name="a23"></a><span class="src-doc"> * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div></li>
|
||||
<li><div class="src-line"><a name="a24"></a><span class="src-doc"> * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div></li>
|
||||
<li><div class="src-line"><a name="a25"></a><span class="src-doc"> * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div></li>
|
||||
<li><div class="src-line"><a name="a26"></a><span class="src-doc"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div></li>
|
||||
<li><div class="src-line"><a name="a27"></a><span class="src-doc"> * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div></li>
|
||||
<li><div class="src-line"><a name="a28"></a><span class="src-doc"> * POSSIBILITY OF SUCH DAMAGE.</span></div></li>
|
||||
<li><div class="src-line"><a name="a29"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a30"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@copyright</span><span class="src-doc"> Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)</span></div></li>
|
||||
<li><div class="src-line"><a name="a31"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@license</span><span class="src-doc"> http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD</span></div></li>
|
||||
<li><div class="src-line"><a name="a32"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> $Id: $</span></div></li>
|
||||
<li><div class="src-line"><a name="a33"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a34"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@package</span><span class="src-doc"> Apache</span></div></li>
|
||||
<li><div class="src-line"><a name="a35"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@subpackage</span><span class="src-doc"> Solr</span></div></li>
|
||||
<li><div class="src-line"><a name="a36"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@author</span><span class="src-doc"> Timo Schmidt <timo.schmidt@aoemedia.de>, Donovan Jimenez <djimenez@conduit-it.com></span></div></li>
|
||||
<li><div class="src-line"><a name="a37"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a38"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a39"></a><span class="src-comm">// Require Apache_Solr_HttpTransport_Abstract</span></div></li>
|
||||
<li><div class="src-line"><a name="a40"></a><span class="src-inc">require_once</span><span class="src-sym">(</span><span class="src-id">dirname</span><span class="src-sym">(</span>__FILE__<span class="src-sym">) </span>. <span class="src-str">'/Abstract.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a41"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a42"></a><span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a43"></a><span class="src-doc"> * An alternative Curl HTTP transport that opens and closes a curl session for</span></div></li>
|
||||
<li><div class="src-line"><a name="a44"></a><span class="src-doc"> * every request. This isn't the recommended way to use curl, but some version of</span></div></li>
|
||||
<li><div class="src-line"><a name="a45"></a><span class="src-doc"> * PHP have memory issues.</span></div></li>
|
||||
<li><div class="src-line"><a name="a46"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a47"></a><span class="src-key">class </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_CurlNoReuse.html">Apache_Solr_HttpTransport_CurlNoReuse</a> <span class="src-key">extends </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Abstract.html">Apache_Solr_HttpTransport_Abstract</a></div></li>
|
||||
<li><div class="src-line"><a name="a48"></a><span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a49"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a50"></a><span class="src-doc"> * SVN Revision meta data for this class</span></div></li>
|
||||
<li><div class="src-line"><a name="a51"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a52"></a> <span class="src-key">const </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_CurlNoReuse.html#constSVN_REVISION">SVN_REVISION</a> = <span class="src-str">'$Revision:$'</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a53"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a54"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a55"></a><span class="src-doc"> * SVN ID meta data for this class</span></div></li>
|
||||
<li><div class="src-line"><a name="a56"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a57"></a> <span class="src-key">const </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_CurlNoReuse.html#constSVN_ID">SVN_ID</a> = <span class="src-str">'$Id:$'</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a58"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a59"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_CurlNoReuse.html#methodperformGetRequest">performGetRequest</a><span class="src-sym">(</span><span class="src-var">$url</span><span class="src-sym">, </span><span class="src-var">$timeout </span>= <span class="src-id">false</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a60"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a61"></a> <span class="src-comm">// check the timeout value</span></div></li>
|
||||
<li><div class="src-line"><a name="a62"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$timeout </span>=== <span class="src-id">false </span>|| <span class="src-var">$timeout </span><= <span class="src-num">0.0</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a63"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a64"></a> <span class="src-comm">// use the default timeout</span></div></li>
|
||||
<li><div class="src-line"><a name="a65"></a> <span class="src-var">$timeout </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Abstract.html#methodgetDefaultTimeout">getDefaultTimeout</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a66"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a67"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a68"></a> <span class="src-var">$curl </span>= <a href="http://www.php.net/curl_init">curl_init</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a69"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a70"></a> <span class="src-comm">// set curl GET options</span></div></li>
|
||||
<li><div class="src-line"><a name="a71"></a> <a href="http://www.php.net/curl_setopt_array">curl_setopt_array</a><span class="src-sym">(</span><span class="src-var">$curl</span><span class="src-sym">, </span><span class="src-key">array</span><span class="src-sym">(</span></div></li>
|
||||
<li><div class="src-line"><a name="a72"></a> <span class="src-comm">// return the response body from curl_exec</span></div></li>
|
||||
<li><div class="src-line"><a name="a73"></a> <span class="src-id">CURLOPT_RETURNTRANSFER </span>=> <span class="src-id">true</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a74"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a75"></a> <span class="src-comm">// get the output as binary data</span></div></li>
|
||||
<li><div class="src-line"><a name="a76"></a> <span class="src-id">CURLOPT_BINARYTRANSFER </span>=> <span class="src-id">true</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a77"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a78"></a> <span class="src-comm">// we do not need the headers in the output, we get everything we need from curl_getinfo</span></div></li>
|
||||
<li><div class="src-line"><a name="a79"></a> <span class="src-id">CURLOPT_HEADER </span>=> <span class="src-id">false</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a80"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a81"></a> <span class="src-comm">// set the URL</span></div></li>
|
||||
<li><div class="src-line"><a name="a82"></a> <span class="src-id">CURLOPT_URL </span>=> <span class="src-var">$url</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a83"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a84"></a> <span class="src-comm">// set the timeout</span></div></li>
|
||||
<li><div class="src-line"><a name="a85"></a> <span class="src-id">CURLOPT_TIMEOUT </span>=> <span class="src-var">$timeout</span></div></li>
|
||||
<li><div class="src-line"><a name="a86"></a> <span class="src-sym">))</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a87"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a88"></a> <span class="src-comm">// make the request</span></div></li>
|
||||
<li><div class="src-line"><a name="a89"></a> <span class="src-var">$responseBody </span>= <a href="http://www.php.net/curl_exec">curl_exec</a><span class="src-sym">(</span><span class="src-var">$curl</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a90"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a91"></a> <span class="src-comm">// get info from the transfer</span></div></li>
|
||||
<li><div class="src-line"><a name="a92"></a> <span class="src-var">$statusCode </span>= <a href="http://www.php.net/curl_getinfo">curl_getinfo</a><span class="src-sym">(</span><span class="src-var">$curl</span><span class="src-sym">, </span><span class="src-id">CURLINFO_HTTP_CODE</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a93"></a> <span class="src-var">$contentType </span>= <a href="http://www.php.net/curl_getinfo">curl_getinfo</a><span class="src-sym">(</span><span class="src-var">$curl</span><span class="src-sym">, </span><span class="src-id">CURLINFO_CONTENT_TYPE</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a94"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a95"></a> <span class="src-comm">// close our curl session - we're done with it</span></div></li>
|
||||
<li><div class="src-line"><a name="a96"></a> <a href="http://www.php.net/curl_close">curl_close</a><span class="src-sym">(</span><span class="src-var">$curl</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a97"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a98"></a> <span class="src-key">return </span><span class="src-key">new </span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_HttpTransport_Response.html">Apache_Solr_HttpTransport_Response</a></span><span class="src-sym">(</span><span class="src-var">$statusCode</span><span class="src-sym">, </span><span class="src-var">$contentType</span><span class="src-sym">, </span><span class="src-var">$responseBody</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a99"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a100"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a101"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_CurlNoReuse.html#methodperformHeadRequest">performHeadRequest</a><span class="src-sym">(</span><span class="src-var">$url</span><span class="src-sym">, </span><span class="src-var">$timeout </span>= <span class="src-id">false</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a102"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a103"></a> <span class="src-comm">// check the timeout value</span></div></li>
|
||||
<li><div class="src-line"><a name="a104"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$timeout </span>=== <span class="src-id">false </span>|| <span class="src-var">$timeout </span><= <span class="src-num">0.0</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a105"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a106"></a> <span class="src-comm">// use the default timeout</span></div></li>
|
||||
<li><div class="src-line"><a name="a107"></a> <span class="src-var">$timeout </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Abstract.html#methodgetDefaultTimeout">getDefaultTimeout</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a108"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a109"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a110"></a> <span class="src-var">$curl </span>= <a href="http://www.php.net/curl_init">curl_init</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a111"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a112"></a> <span class="src-comm">// set curl HEAD options</span></div></li>
|
||||
<li><div class="src-line"><a name="a113"></a> <a href="http://www.php.net/curl_setopt_array">curl_setopt_array</a><span class="src-sym">(</span><span class="src-var">$curl</span><span class="src-sym">, </span><span class="src-key">array</span><span class="src-sym">(</span></div></li>
|
||||
<li><div class="src-line"><a name="a114"></a> <span class="src-comm">// return the response body from curl_exec</span></div></li>
|
||||
<li><div class="src-line"><a name="a115"></a> <span class="src-id">CURLOPT_RETURNTRANSFER </span>=> <span class="src-id">true</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a116"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a117"></a> <span class="src-comm">// get the output as binary data</span></div></li>
|
||||
<li><div class="src-line"><a name="a118"></a> <span class="src-id">CURLOPT_BINARYTRANSFER </span>=> <span class="src-id">true</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a119"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a120"></a> <span class="src-comm">// we do not need the headers in the output, we get everything we need from curl_getinfo</span></div></li>
|
||||
<li><div class="src-line"><a name="a121"></a> <span class="src-id">CURLOPT_HEADER </span>=> <span class="src-id">false</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a122"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a123"></a> <span class="src-comm">// this both sets the method to HEAD and says not to return a body</span></div></li>
|
||||
<li><div class="src-line"><a name="a124"></a> <span class="src-id">CURLOPT_NOBODY </span>=> <span class="src-id">true</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a125"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a126"></a> <span class="src-comm">// set the URL</span></div></li>
|
||||
<li><div class="src-line"><a name="a127"></a> <span class="src-id">CURLOPT_URL </span>=> <span class="src-var">$url</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a128"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a129"></a> <span class="src-comm">// set the timeout</span></div></li>
|
||||
<li><div class="src-line"><a name="a130"></a> <span class="src-id">CURLOPT_TIMEOUT </span>=> <span class="src-var">$timeout</span></div></li>
|
||||
<li><div class="src-line"><a name="a131"></a> <span class="src-sym">))</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a132"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a133"></a> <span class="src-comm">// make the request</span></div></li>
|
||||
<li><div class="src-line"><a name="a134"></a> <span class="src-var">$responseBody </span>= <a href="http://www.php.net/curl_exec">curl_exec</a><span class="src-sym">(</span><span class="src-var">$curl</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a135"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a136"></a> <span class="src-comm">// get info from the transfer</span></div></li>
|
||||
<li><div class="src-line"><a name="a137"></a> <span class="src-var">$statusCode </span>= <a href="http://www.php.net/curl_getinfo">curl_getinfo</a><span class="src-sym">(</span><span class="src-var">$curl</span><span class="src-sym">, </span><span class="src-id">CURLINFO_HTTP_CODE</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a138"></a> <span class="src-var">$contentType </span>= <a href="http://www.php.net/curl_getinfo">curl_getinfo</a><span class="src-sym">(</span><span class="src-var">$curl</span><span class="src-sym">, </span><span class="src-id">CURLINFO_CONTENT_TYPE</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a139"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a140"></a> <span class="src-comm">// close our curl session - we're done with it</span></div></li>
|
||||
<li><div class="src-line"><a name="a141"></a> <a href="http://www.php.net/curl_close">curl_close</a><span class="src-sym">(</span><span class="src-var">$curl</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a142"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a143"></a> <span class="src-key">return </span><span class="src-key">new </span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_HttpTransport_Response.html">Apache_Solr_HttpTransport_Response</a></span><span class="src-sym">(</span><span class="src-var">$statusCode</span><span class="src-sym">, </span><span class="src-var">$contentType</span><span class="src-sym">, </span><span class="src-var">$responseBody</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a144"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a145"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a146"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_CurlNoReuse.html#methodperformPostRequest">performPostRequest</a><span class="src-sym">(</span><span class="src-var">$url</span><span class="src-sym">, </span><span class="src-var">$postData</span><span class="src-sym">, </span><span class="src-var">$contentType</span><span class="src-sym">, </span><span class="src-var">$timeout </span>= <span class="src-id">false</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a147"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a148"></a> <span class="src-comm">// check the timeout value</span></div></li>
|
||||
<li><div class="src-line"><a name="a149"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$timeout </span>=== <span class="src-id">false </span>|| <span class="src-var">$timeout </span><= <span class="src-num">0.0</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a150"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a151"></a> <span class="src-comm">// use the default timeout</span></div></li>
|
||||
<li><div class="src-line"><a name="a152"></a> <span class="src-var">$timeout </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Abstract.html#methodgetDefaultTimeout">getDefaultTimeout</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a153"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a154"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a155"></a> <span class="src-var">$curl </span>= <a href="http://www.php.net/curl_init">curl_init</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a156"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a157"></a> <span class="src-comm">// set curl POST options</span></div></li>
|
||||
<li><div class="src-line"><a name="a158"></a> <a href="http://www.php.net/curl_setopt_array">curl_setopt_array</a><span class="src-sym">(</span><span class="src-var">$curl</span><span class="src-sym">, </span><span class="src-key">array</span><span class="src-sym">(</span></div></li>
|
||||
<li><div class="src-line"><a name="a159"></a> <span class="src-comm">// return the response body from curl_exec</span></div></li>
|
||||
<li><div class="src-line"><a name="a160"></a> <span class="src-id">CURLOPT_RETURNTRANSFER </span>=> <span class="src-id">true</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a161"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a162"></a> <span class="src-comm">// get the output as binary data</span></div></li>
|
||||
<li><div class="src-line"><a name="a163"></a> <span class="src-id">CURLOPT_BINARYTRANSFER </span>=> <span class="src-id">true</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a164"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a165"></a> <span class="src-comm">// we do not need the headers in the output, we get everything we need from curl_getinfo</span></div></li>
|
||||
<li><div class="src-line"><a name="a166"></a> <span class="src-id">CURLOPT_HEADER </span>=> <span class="src-id">false</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a167"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a168"></a> <span class="src-comm">// make sure we're POST</span></div></li>
|
||||
<li><div class="src-line"><a name="a169"></a> <span class="src-id">CURLOPT_POST </span>=> <span class="src-id">true</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a170"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a171"></a> <span class="src-comm">// set the URL</span></div></li>
|
||||
<li><div class="src-line"><a name="a172"></a> <span class="src-id">CURLOPT_URL </span>=> <span class="src-var">$url</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a173"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a174"></a> <span class="src-comm">// set the post data</span></div></li>
|
||||
<li><div class="src-line"><a name="a175"></a> <span class="src-id">CURLOPT_POSTFIELDS </span>=> <span class="src-var">$postData</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a176"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a177"></a> <span class="src-comm">// set the content type</span></div></li>
|
||||
<li><div class="src-line"><a name="a178"></a> <span class="src-id">CURLOPT_HTTPHEADER </span>=> <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">"</span><span class="src-str">Content-Type: {<span class="src-var">$contentType</span><span class="src-sym">}</span></span><span class="src-str">"</span><span class="src-sym">)</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a179"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a180"></a> <span class="src-comm">// set the timeout</span></div></li>
|
||||
<li><div class="src-line"><a name="a181"></a> <span class="src-id">CURLOPT_TIMEOUT </span>=> <span class="src-var">$timeout</span></div></li>
|
||||
<li><div class="src-line"><a name="a182"></a> <span class="src-sym">))</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a183"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a184"></a> <span class="src-comm">// make the request</span></div></li>
|
||||
<li><div class="src-line"><a name="a185"></a> <span class="src-var">$responseBody </span>= <a href="http://www.php.net/curl_exec">curl_exec</a><span class="src-sym">(</span><span class="src-var">$curl</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a186"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a187"></a> <span class="src-comm">// get info from the transfer</span></div></li>
|
||||
<li><div class="src-line"><a name="a188"></a> <span class="src-var">$statusCode </span>= <a href="http://www.php.net/curl_getinfo">curl_getinfo</a><span class="src-sym">(</span><span class="src-var">$curl</span><span class="src-sym">, </span><span class="src-id">CURLINFO_HTTP_CODE</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a189"></a> <span class="src-var">$contentType </span>= <a href="http://www.php.net/curl_getinfo">curl_getinfo</a><span class="src-sym">(</span><span class="src-var">$curl</span><span class="src-sym">, </span><span class="src-id">CURLINFO_CONTENT_TYPE</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a190"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a191"></a> <span class="src-comm">// close our curl session - we're done with it</span></div></li>
|
||||
<li><div class="src-line"><a name="a192"></a> <a href="http://www.php.net/curl_close">curl_close</a><span class="src-sym">(</span><span class="src-var">$curl</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a193"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a194"></a> <span class="src-key">return </span><span class="src-key">new </span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_HttpTransport_Response.html">Apache_Solr_HttpTransport_Response</a></span><span class="src-sym">(</span><span class="src-var">$statusCode</span><span class="src-sym">, </span><span class="src-var">$contentType</span><span class="src-sym">, </span><span class="src-var">$responseBody</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a195"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a196"></a><span class="src-sym">}</span></div></li>
|
||||
</ol></div>
|
||||
</div>
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:13 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,99 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>File Source for HttpTransportException.php</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Source for file HttpTransportException.php</h1>
|
||||
<p>Documentation is available at <a href="../Apache/Solr/_HttpTransportException.php.html">HttpTransportException.php</a></p>
|
||||
<div class="src-code">
|
||||
<div class="src-code"><ol><li><div class="src-line"><a name="a1"></a><span class="src-php"><?php</span></div></li>
|
||||
<li><div class="src-line"><a name="a2"></a><span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a3"></a><span class="src-doc"> * Copyright (c) 2007-2011, Servigistics, Inc.</span></div></li>
|
||||
<li><div class="src-line"><a name="a4"></a><span class="src-doc"> * All rights reserved.</span></div></li>
|
||||
<li><div class="src-line"><a name="a5"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a6"></a><span class="src-doc"> * Redistribution and use in source and binary forms, with or without</span></div></li>
|
||||
<li><div class="src-line"><a name="a7"></a><span class="src-doc"> * modification, are permitted provided that the following conditions are met:</span></div></li>
|
||||
<li><div class="src-line"><a name="a8"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a9"></a><span class="src-doc"> * - Redistributions of source code must retain the above copyright notice,</span></div></li>
|
||||
<li><div class="src-line"><a name="a10"></a><span class="src-doc"> * this list of conditions and the following disclaimer.</span></div></li>
|
||||
<li><div class="src-line"><a name="a11"></a><span class="src-doc"> * - Redistributions in binary form must reproduce the above copyright</span></div></li>
|
||||
<li><div class="src-line"><a name="a12"></a><span class="src-doc"> * notice, this list of conditions and the following disclaimer in the</span></div></li>
|
||||
<li><div class="src-line"><a name="a13"></a><span class="src-doc"> * documentation and/or other materials provided with the distribution.</span></div></li>
|
||||
<li><div class="src-line"><a name="a14"></a><span class="src-doc"> * - Neither the name of Servigistics, Inc. nor the names of</span></div></li>
|
||||
<li><div class="src-line"><a name="a15"></a><span class="src-doc"> * its contributors may be used to endorse or promote products derived from</span></div></li>
|
||||
<li><div class="src-line"><a name="a16"></a><span class="src-doc"> * this software without specific prior written permission.</span></div></li>
|
||||
<li><div class="src-line"><a name="a17"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a18"></a><span class="src-doc"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"</span></div></li>
|
||||
<li><div class="src-line"><a name="a19"></a><span class="src-doc"> * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div></li>
|
||||
<li><div class="src-line"><a name="a20"></a><span class="src-doc"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div></li>
|
||||
<li><div class="src-line"><a name="a21"></a><span class="src-doc"> * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE</span></div></li>
|
||||
<li><div class="src-line"><a name="a22"></a><span class="src-doc"> * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div></li>
|
||||
<li><div class="src-line"><a name="a23"></a><span class="src-doc"> * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div></li>
|
||||
<li><div class="src-line"><a name="a24"></a><span class="src-doc"> * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div></li>
|
||||
<li><div class="src-line"><a name="a25"></a><span class="src-doc"> * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div></li>
|
||||
<li><div class="src-line"><a name="a26"></a><span class="src-doc"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div></li>
|
||||
<li><div class="src-line"><a name="a27"></a><span class="src-doc"> * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div></li>
|
||||
<li><div class="src-line"><a name="a28"></a><span class="src-doc"> * POSSIBILITY OF SUCH DAMAGE.</span></div></li>
|
||||
<li><div class="src-line"><a name="a29"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a30"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@copyright</span><span class="src-doc"> Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)</span></div></li>
|
||||
<li><div class="src-line"><a name="a31"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@license</span><span class="src-doc"> http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD</span></div></li>
|
||||
<li><div class="src-line"><a name="a32"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> $Id: HttpTransportException.php 54 2011-02-04 16:29:18Z donovan.jimenez $</span></div></li>
|
||||
<li><div class="src-line"><a name="a33"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a34"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@package</span><span class="src-doc"> Apache</span></div></li>
|
||||
<li><div class="src-line"><a name="a35"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@subpackage</span><span class="src-doc"> Solr</span></div></li>
|
||||
<li><div class="src-line"><a name="a36"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@author</span><span class="src-doc"> Donovan Jimenez <djimenez@conduit-it.com></span></div></li>
|
||||
<li><div class="src-line"><a name="a37"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a38"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a39"></a><span class="src-key">class </span><a href="../Apache/Solr/Apache_Solr_HttpTransportException.html">Apache_Solr_HttpTransportException</a> <span class="src-key">extends </span><a href="../Apache/Solr/Apache_Solr_Exception.html">Apache_Solr_Exception</a></div></li>
|
||||
<li><div class="src-line"><a name="a40"></a><span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a41"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a42"></a><span class="src-doc"> * SVN Revision meta data for this class</span></div></li>
|
||||
<li><div class="src-line"><a name="a43"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a44"></a> <span class="src-key">const </span><a href="../Apache/Solr/Apache_Solr_HttpTransportException.html#constSVN_REVISION">SVN_REVISION</a> = <span class="src-str">'$Revision: 54 $'</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a45"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a46"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a47"></a><span class="src-doc"> * SVN ID meta data for this class</span></div></li>
|
||||
<li><div class="src-line"><a name="a48"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a49"></a> <span class="src-key">const </span><a href="../Apache/Solr/Apache_Solr_HttpTransportException.html#constSVN_ID">SVN_ID</a> = <span class="src-str">'$Id: HttpTransportException.php 54 2011-02-04 16:29:18Z donovan.jimenez $'</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a50"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a51"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a52"></a><span class="src-doc"> * Response for which exception was generated</span></div></li>
|
||||
<li><div class="src-line"><a name="a53"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a54"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">Apache_Solr_Response </span></div></li>
|
||||
<li><div class="src-line"><a name="a55"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a56"></a> <span class="src-key">private </span><span class="src-var">$_response</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a57"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a58"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a59"></a><span class="src-doc"> * HttpTransportException Constructor</span></div></li>
|
||||
<li><div class="src-line"><a name="a60"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a61"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">Apache_Solr_Response </span><span class="src-doc-var">$response </span></div></li>
|
||||
<li><div class="src-line"><a name="a62"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a63"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_HttpTransportException.html#method__construct">__construct</a><span class="src-sym">(</span><span class="src-id">Apache_Solr_Response </span><span class="src-var">$response</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a64"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a65"></a> <span class="src-id">parent</span><span class="src-sym">::</span><span class="src-id">__construct</span><span class="src-sym">(</span><span class="src-str">"</span><span class="src-str">'{<span class="src-var">$response</span></span><span class="src-sym">-></span><span class="src-id">getHttpStatus</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-str"></span><span class="src-sym">}</span>' Status: {<span class="src-var">$response</span></span><span class="src-sym">-></span><span class="src-id">getHttpStatusMessage</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-str"></span><span class="src-sym">}</span></span><span class="src-str">"</span><span class="src-sym">, </span><span class="src-var">$response</span><span class="src-sym">-></span><span class="src-id">getHttpStatus</span><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a66"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a67"></a> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_response </span>= <span class="src-var">$response</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a68"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a69"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a70"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a71"></a><span class="src-doc"> * Get the response for which this exception was generated</span></div></li>
|
||||
<li><div class="src-line"><a name="a72"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a73"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">Apache_Solr_Response </span></div></li>
|
||||
<li><div class="src-line"><a name="a74"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a75"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_HttpTransportException.html#methodgetResponse">getResponse</a><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a76"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a77"></a> <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_response</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a78"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a79"></a><span class="src-sym">}</span></div></li>
|
||||
</ol></div>
|
||||
</div>
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:14 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,236 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>File Source for FileGetContents.php</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Source for file FileGetContents.php</h1>
|
||||
<p>Documentation is available at <a href="../Apache/Solr/_HttpTransport---FileGetContents.php.html">FileGetContents.php</a></p>
|
||||
<div class="src-code">
|
||||
<div class="src-code"><ol><li><div class="src-line"><a name="a1"></a><span class="src-php"><?php</span></div></li>
|
||||
<li><div class="src-line"><a name="a2"></a><span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a3"></a><span class="src-doc"> * Copyright (c) 2007-2011, Servigistics, Inc.</span></div></li>
|
||||
<li><div class="src-line"><a name="a4"></a><span class="src-doc"> * All rights reserved.</span></div></li>
|
||||
<li><div class="src-line"><a name="a5"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a6"></a><span class="src-doc"> * Redistribution and use in source and binary forms, with or without</span></div></li>
|
||||
<li><div class="src-line"><a name="a7"></a><span class="src-doc"> * modification, are permitted provided that the following conditions are met:</span></div></li>
|
||||
<li><div class="src-line"><a name="a8"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a9"></a><span class="src-doc"> * - Redistributions of source code must retain the above copyright notice,</span></div></li>
|
||||
<li><div class="src-line"><a name="a10"></a><span class="src-doc"> * this list of conditions and the following disclaimer.</span></div></li>
|
||||
<li><div class="src-line"><a name="a11"></a><span class="src-doc"> * - Redistributions in binary form must reproduce the above copyright</span></div></li>
|
||||
<li><div class="src-line"><a name="a12"></a><span class="src-doc"> * notice, this list of conditions and the following disclaimer in the</span></div></li>
|
||||
<li><div class="src-line"><a name="a13"></a><span class="src-doc"> * documentation and/or other materials provided with the distribution.</span></div></li>
|
||||
<li><div class="src-line"><a name="a14"></a><span class="src-doc"> * - Neither the name of Servigistics, Inc. nor the names of</span></div></li>
|
||||
<li><div class="src-line"><a name="a15"></a><span class="src-doc"> * its contributors may be used to endorse or promote products derived from</span></div></li>
|
||||
<li><div class="src-line"><a name="a16"></a><span class="src-doc"> * this software without specific prior written permission.</span></div></li>
|
||||
<li><div class="src-line"><a name="a17"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a18"></a><span class="src-doc"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"</span></div></li>
|
||||
<li><div class="src-line"><a name="a19"></a><span class="src-doc"> * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div></li>
|
||||
<li><div class="src-line"><a name="a20"></a><span class="src-doc"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div></li>
|
||||
<li><div class="src-line"><a name="a21"></a><span class="src-doc"> * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE</span></div></li>
|
||||
<li><div class="src-line"><a name="a22"></a><span class="src-doc"> * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div></li>
|
||||
<li><div class="src-line"><a name="a23"></a><span class="src-doc"> * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div></li>
|
||||
<li><div class="src-line"><a name="a24"></a><span class="src-doc"> * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div></li>
|
||||
<li><div class="src-line"><a name="a25"></a><span class="src-doc"> * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div></li>
|
||||
<li><div class="src-line"><a name="a26"></a><span class="src-doc"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div></li>
|
||||
<li><div class="src-line"><a name="a27"></a><span class="src-doc"> * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div></li>
|
||||
<li><div class="src-line"><a name="a28"></a><span class="src-doc"> * POSSIBILITY OF SUCH DAMAGE.</span></div></li>
|
||||
<li><div class="src-line"><a name="a29"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a30"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@copyright</span><span class="src-doc"> Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)</span></div></li>
|
||||
<li><div class="src-line"><a name="a31"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@license</span><span class="src-doc"> http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD</span></div></li>
|
||||
<li><div class="src-line"><a name="a32"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> $Id: $</span></div></li>
|
||||
<li><div class="src-line"><a name="a33"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a34"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@package</span><span class="src-doc"> Apache</span></div></li>
|
||||
<li><div class="src-line"><a name="a35"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@subpackage</span><span class="src-doc"> Solr</span></div></li>
|
||||
<li><div class="src-line"><a name="a36"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@author</span><span class="src-doc"> Donovan Jimenez <djimenez@conduit-it.com></span></div></li>
|
||||
<li><div class="src-line"><a name="a37"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a38"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a39"></a><span class="src-comm">// Require Apache_Solr_HttpTransport_Abstract</span></div></li>
|
||||
<li><div class="src-line"><a name="a40"></a><span class="src-inc">require_once</span><span class="src-sym">(</span><span class="src-id">dirname</span><span class="src-sym">(</span>__FILE__<span class="src-sym">) </span>. <span class="src-str">'/Abstract.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a41"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a42"></a><span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a43"></a><span class="src-doc"> * HTTP Transport implemenation that uses the builtin http URL wrappers and file_get_contents</span></div></li>
|
||||
<li><div class="src-line"><a name="a44"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a45"></a><span class="src-key">class </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_FileGetContents.html">Apache_Solr_HttpTransport_FileGetContents</a> <span class="src-key">extends </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Abstract.html">Apache_Solr_HttpTransport_Abstract</a></div></li>
|
||||
<li><div class="src-line"><a name="a46"></a><span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a47"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a48"></a><span class="src-doc"> * SVN Revision meta data for this class</span></div></li>
|
||||
<li><div class="src-line"><a name="a49"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a50"></a> <span class="src-key">const </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_FileGetContents.html#constSVN_REVISION">SVN_REVISION</a> = <span class="src-str">'$Revision: $'</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a51"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a52"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a53"></a><span class="src-doc"> * SVN ID meta data for this class</span></div></li>
|
||||
<li><div class="src-line"><a name="a54"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a55"></a> <span class="src-key">const </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_FileGetContents.html#constSVN_ID">SVN_ID</a> = <span class="src-str">'$Id: $'</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a56"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a57"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a58"></a><span class="src-doc"> * Reusable stream context resources for GET and POST operations</span></div></li>
|
||||
<li><div class="src-line"><a name="a59"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a60"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">resource </span></div></li>
|
||||
<li><div class="src-line"><a name="a61"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a62"></a> <span class="src-key">private </span><span class="src-var">$_getContext</span><span class="src-sym">, </span><span class="src-var">$_headContext</span><span class="src-sym">, </span><span class="src-var">$_postContext</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a63"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a64"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a65"></a><span class="src-doc"> * Initializes our reuseable get and post stream contexts</span></div></li>
|
||||
<li><div class="src-line"><a name="a66"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a67"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_FileGetContents.html#method__construct">__construct</a><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a68"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a69"></a> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_getContext </span>= <a href="http://www.php.net/stream_context_create">stream_context_create</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a70"></a> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_headContext </span>= <a href="http://www.php.net/stream_context_create">stream_context_create</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a71"></a> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_postContext </span>= <a href="http://www.php.net/stream_context_create">stream_context_create</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a72"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a73"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a74"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_FileGetContents.html#methodperformGetRequest">performGetRequest</a><span class="src-sym">(</span><span class="src-var">$url</span><span class="src-sym">, </span><span class="src-var">$timeout </span>= <span class="src-id">false</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a75"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a76"></a> <span class="src-comm">// set the timeout if specified</span></div></li>
|
||||
<li><div class="src-line"><a name="a77"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$timeout </span>!== <span class="src-id">FALSE </span>&& <span class="src-var">$timeout </span>> <span class="src-num">0.0</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a78"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a79"></a> <span class="src-comm">// timeouts with file_get_contents seem to need</span></div></li>
|
||||
<li><div class="src-line"><a name="a80"></a> <span class="src-comm">// to be halved to work as expected</span></div></li>
|
||||
<li><div class="src-line"><a name="a81"></a> <span class="src-var">$timeout </span>= (float) <span class="src-var">$timeout </span>/ <span class="src-num">2</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a82"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a83"></a> <a href="http://www.php.net/stream_context_set_option">stream_context_set_option</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_getContext</span><span class="src-sym">, </span><span class="src-str">'http'</span><span class="src-sym">, </span><span class="src-str">'timeout'</span><span class="src-sym">, </span><span class="src-var">$timeout</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a84"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a85"></a> <span class="src-key">else</span></div></li>
|
||||
<li><div class="src-line"><a name="a86"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a87"></a> <span class="src-comm">// use the default timeout pulled from default_socket_timeout otherwise</span></div></li>
|
||||
<li><div class="src-line"><a name="a88"></a> <a href="http://www.php.net/stream_context_set_option">stream_context_set_option</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_getContext</span><span class="src-sym">, </span><span class="src-str">'http'</span><span class="src-sym">, </span><span class="src-str">'timeout'</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Abstract.html#methodgetDefaultTimeout">getDefaultTimeout</a><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a89"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a90"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a91"></a> <span class="src-comm">// $http_response_headers will be updated by the call to file_get_contents later</span></div></li>
|
||||
<li><div class="src-line"><a name="a92"></a> <span class="src-comm">// see http://us.php.net/manual/en/wrappers.http.php for documentation</span></div></li>
|
||||
<li><div class="src-line"><a name="a93"></a> <span class="src-comm">// Unfortunately, it will still create a notice in analyzers if we don't set it here</span></div></li>
|
||||
<li><div class="src-line"><a name="a94"></a> <span class="src-var">$http_response_header </span>= <span class="src-id">null</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a95"></a> <span class="src-var">$responseBody </span>= <span class="src-sym">@</span><a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-var">$url</span><span class="src-sym">, </span><span class="src-id">false</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_getContext</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a96"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a97"></a> <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">_getResponseFromParts</span><span class="src-sym">(</span><span class="src-var">$responseBody</span><span class="src-sym">, </span><span class="src-var">$http_response_header</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a98"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a99"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a100"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_FileGetContents.html#methodperformHeadRequest">performHeadRequest</a><span class="src-sym">(</span><span class="src-var">$url</span><span class="src-sym">, </span><span class="src-var">$timeout </span>= <span class="src-id">false</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a101"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a102"></a> <a href="http://www.php.net/stream_context_set_option">stream_context_set_option</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_headContext</span><span class="src-sym">, </span><span class="src-key">array</span><span class="src-sym">(</span></div></li>
|
||||
<li><div class="src-line"><a name="a103"></a> <span class="src-str">'http' </span>=> <span class="src-key">array</span><span class="src-sym">(</span></div></li>
|
||||
<li><div class="src-line"><a name="a104"></a> <span class="src-comm">// set HTTP method</span></div></li>
|
||||
<li><div class="src-line"><a name="a105"></a> <span class="src-str">'method' </span>=> <span class="src-str">'HEAD'</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a106"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a107"></a> <span class="src-comm">// default timeout</span></div></li>
|
||||
<li><div class="src-line"><a name="a108"></a> <span class="src-str">'timeout' </span>=> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Abstract.html#methodgetDefaultTimeout">getDefaultTimeout</a><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a109"></a> <span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a110"></a> <span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a111"></a> <span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a112"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a113"></a> <span class="src-comm">// set the timeout if specified</span></div></li>
|
||||
<li><div class="src-line"><a name="a114"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$timeout </span>!== <span class="src-id">FALSE </span>&& <span class="src-var">$timeout </span>> <span class="src-num">0.0</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a115"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a116"></a> <span class="src-comm">// timeouts with file_get_contents seem to need</span></div></li>
|
||||
<li><div class="src-line"><a name="a117"></a> <span class="src-comm">// to be halved to work as expected</span></div></li>
|
||||
<li><div class="src-line"><a name="a118"></a> <span class="src-var">$timeout </span>= (float) <span class="src-var">$timeout </span>/ <span class="src-num">2</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a119"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a120"></a> <a href="http://www.php.net/stream_context_set_option">stream_context_set_option</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_headContext</span><span class="src-sym">, </span><span class="src-str">'http'</span><span class="src-sym">, </span><span class="src-str">'timeout'</span><span class="src-sym">, </span><span class="src-var">$timeout</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a121"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a122"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a123"></a> <span class="src-comm">// $http_response_headers will be updated by the call to file_get_contents later</span></div></li>
|
||||
<li><div class="src-line"><a name="a124"></a> <span class="src-comm">// see http://us.php.net/manual/en/wrappers.http.php for documentation</span></div></li>
|
||||
<li><div class="src-line"><a name="a125"></a> <span class="src-comm">// Unfortunately, it will still create a notice in analyzers if we don't set it here</span></div></li>
|
||||
<li><div class="src-line"><a name="a126"></a> <span class="src-var">$http_response_header </span>= <span class="src-id">null</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a127"></a> <span class="src-var">$responseBody </span>= <span class="src-sym">@</span><a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-var">$url</span><span class="src-sym">, </span><span class="src-id">false</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_headContext</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a128"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a129"></a> <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">_getResponseFromParts</span><span class="src-sym">(</span><span class="src-var">$responseBody</span><span class="src-sym">, </span><span class="src-var">$http_response_header</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a130"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a131"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a132"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_FileGetContents.html#methodperformPostRequest">performPostRequest</a><span class="src-sym">(</span><span class="src-var">$url</span><span class="src-sym">, </span><span class="src-var">$rawPost</span><span class="src-sym">, </span><span class="src-var">$contentType</span><span class="src-sym">, </span><span class="src-var">$timeout </span>= <span class="src-id">false</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a133"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a134"></a> <a href="http://www.php.net/stream_context_set_option">stream_context_set_option</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_postContext</span><span class="src-sym">, </span><span class="src-key">array</span><span class="src-sym">(</span></div></li>
|
||||
<li><div class="src-line"><a name="a135"></a> <span class="src-str">'http' </span>=> <span class="src-key">array</span><span class="src-sym">(</span></div></li>
|
||||
<li><div class="src-line"><a name="a136"></a> <span class="src-comm">// set HTTP method</span></div></li>
|
||||
<li><div class="src-line"><a name="a137"></a> <span class="src-str">'method' </span>=> <span class="src-str">'POST'</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a138"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a139"></a> <span class="src-comm">// Add our posted content type</span></div></li>
|
||||
<li><div class="src-line"><a name="a140"></a> <span class="src-str">'header' </span>=> <span class="src-str">"</span><span class="src-str">Content-Type: <span class="src-var">$contentType</span></span><span class="src-str">"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a141"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a142"></a> <span class="src-comm">// the posted content</span></div></li>
|
||||
<li><div class="src-line"><a name="a143"></a> <span class="src-str">'content' </span>=> <span class="src-var">$rawPost</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a144"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a145"></a> <span class="src-comm">// default timeout</span></div></li>
|
||||
<li><div class="src-line"><a name="a146"></a> <span class="src-str">'timeout' </span>=> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Abstract.html#methodgetDefaultTimeout">getDefaultTimeout</a><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a147"></a> <span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a148"></a> <span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a149"></a> <span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a150"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a151"></a> <span class="src-comm">// set the timeout if specified</span></div></li>
|
||||
<li><div class="src-line"><a name="a152"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$timeout </span>!== <span class="src-id">FALSE </span>&& <span class="src-var">$timeout </span>> <span class="src-num">0.0</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a153"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a154"></a> <span class="src-comm">// timeouts with file_get_contents seem to need</span></div></li>
|
||||
<li><div class="src-line"><a name="a155"></a> <span class="src-comm">// to be halved to work as expected</span></div></li>
|
||||
<li><div class="src-line"><a name="a156"></a> <span class="src-var">$timeout </span>= (float) <span class="src-var">$timeout </span>/ <span class="src-num">2</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a157"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a158"></a> <a href="http://www.php.net/stream_context_set_option">stream_context_set_option</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_postContext</span><span class="src-sym">, </span><span class="src-str">'http'</span><span class="src-sym">, </span><span class="src-str">'timeout'</span><span class="src-sym">, </span><span class="src-var">$timeout</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a159"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a160"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a161"></a> <span class="src-comm">// $http_response_header will be updated by the call to file_get_contents later</span></div></li>
|
||||
<li><div class="src-line"><a name="a162"></a> <span class="src-comm">// see http://us.php.net/manual/en/wrappers.http.php for documentation</span></div></li>
|
||||
<li><div class="src-line"><a name="a163"></a> <span class="src-comm">// Unfortunately, it will still create a notice in analyzers if we don't set it here</span></div></li>
|
||||
<li><div class="src-line"><a name="a164"></a> <span class="src-var">$http_response_header </span>= <span class="src-id">null</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a165"></a> <span class="src-var">$responseBody </span>= <span class="src-sym">@</span><a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-var">$url</span><span class="src-sym">, </span><span class="src-id">false</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_postContext</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a166"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a167"></a> <span class="src-comm">// reset content of post context to reclaim memory</span></div></li>
|
||||
<li><div class="src-line"><a name="a168"></a> <a href="http://www.php.net/stream_context_set_option">stream_context_set_option</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_postContext</span><span class="src-sym">, </span><span class="src-str">'http'</span><span class="src-sym">, </span><span class="src-str">'content'</span><span class="src-sym">, </span><span class="src-str">''</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a169"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a170"></a> <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-id">_getResponseFromParts</span><span class="src-sym">(</span><span class="src-var">$responseBody</span><span class="src-sym">, </span><span class="src-var">$http_response_header</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a171"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a172"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a173"></a> <span class="src-key">private </span><span class="src-key">function </span><span class="src-id">_getResponseFromParts</span><span class="src-sym">(</span><span class="src-var">$rawResponse</span><span class="src-sym">, </span><span class="src-var">$httpHeaders</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a174"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a175"></a> <span class="src-comm">//Assume 0, false as defaults</span></div></li>
|
||||
<li><div class="src-line"><a name="a176"></a> <span class="src-var">$status </span>= <span class="src-num">0</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a177"></a> <span class="src-var">$contentType </span>= <span class="src-id">false</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a178"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a179"></a> <span class="src-comm">//iterate through headers for real status, type, and encoding</span></div></li>
|
||||
<li><div class="src-line"><a name="a180"></a> <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$httpHeaders</span><span class="src-sym">) </span>&& <a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$httpHeaders</span><span class="src-sym">) </span>> <span class="src-num">0</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a181"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a182"></a> <span class="src-comm">//look at the first headers for the HTTP status code</span></div></li>
|
||||
<li><div class="src-line"><a name="a183"></a> <span class="src-comm">//and message (errors are usually returned this way)</span></div></li>
|
||||
<li><div class="src-line"><a name="a184"></a> <span class="src-comm">//</span></div></li>
|
||||
<li><div class="src-line"><a name="a185"></a> <span class="src-comm">//HTTP 100 Continue response can also be returned before</span></div></li>
|
||||
<li><div class="src-line"><a name="a186"></a> <span class="src-comm">//the REAL status header, so we need look until we find</span></div></li>
|
||||
<li><div class="src-line"><a name="a187"></a> <span class="src-comm">//the last header starting with HTTP</span></div></li>
|
||||
<li><div class="src-line"><a name="a188"></a> <span class="src-comm">//</span></div></li>
|
||||
<li><div class="src-line"><a name="a189"></a> <span class="src-comm">//the spec: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.1</span></div></li>
|
||||
<li><div class="src-line"><a name="a190"></a> <span class="src-comm">//</span></div></li>
|
||||
<li><div class="src-line"><a name="a191"></a> <span class="src-comm">//Thanks to Daniel Andersson for pointing out this oversight</span></div></li>
|
||||
<li><div class="src-line"><a name="a192"></a> <span class="src-key">while </span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$httpHeaders</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">) </span>&& <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$httpHeaders</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-num">0</span><span class="src-sym">, </span><span class="src-num">4</span><span class="src-sym">) </span>== <span class="src-str">'HTTP'</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a193"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a194"></a> <span class="src-comm">// we can do a intval on status line without the "HTTP/1.X " to get the code</span></div></li>
|
||||
<li><div class="src-line"><a name="a195"></a> <span class="src-var">$status </span>= <a href="http://www.php.net/intval">intval</a><span class="src-sym">(</span><a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$httpHeaders</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-num">9</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a196"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a197"></a> <span class="src-comm">// remove this from the headers so we can check for more</span></div></li>
|
||||
<li><div class="src-line"><a name="a198"></a> <a href="http://www.php.net/array_shift">array_shift</a><span class="src-sym">(</span><span class="src-var">$httpHeaders</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a199"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a200"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a201"></a> <span class="src-comm">//Look for the Content-Type response header and determine type</span></div></li>
|
||||
<li><div class="src-line"><a name="a202"></a> <span class="src-comm">//and encoding from it (if possible - such as 'Content-Type: text/plain; charset=UTF-8')</span></div></li>
|
||||
<li><div class="src-line"><a name="a203"></a> <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$httpHeaders </span><span class="src-key">as </span><span class="src-var">$header</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a204"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a205"></a> <span class="src-comm">// look for the header that starts appropriately</span></div></li>
|
||||
<li><div class="src-line"><a name="a206"></a> <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/strncasecmp">strncasecmp</a><span class="src-sym">(</span><span class="src-var">$header</span><span class="src-sym">, </span><span class="src-str">'Content-Type:'</span><span class="src-sym">, </span><span class="src-num">13</span><span class="src-sym">) </span>== <span class="src-num">0</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a207"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a208"></a> <span class="src-var">$contentType </span>= <a href="http://www.php.net/substr">substr</a><span class="src-sym">(</span><span class="src-var">$header</span><span class="src-sym">, </span><span class="src-num">13</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a209"></a> <span class="src-key">break</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a210"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a211"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a212"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a213"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a214"></a> <span class="src-key">return </span><span class="src-key">new </span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_HttpTransport_Response.html">Apache_Solr_HttpTransport_Response</a></span><span class="src-sym">(</span><span class="src-var">$status</span><span class="src-sym">, </span><span class="src-var">$contentType</span><span class="src-sym">, </span><span class="src-var">$rawResponse</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a215"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a216"></a><span class="src-sym">}</span></div></li>
|
||||
</ol></div>
|
||||
</div>
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:14 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>File Source for Interface.php</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Source for file Interface.php</h1>
|
||||
<p>Documentation is available at <a href="../Apache/Solr/_HttpTransport---Interface.php.html">Interface.php</a></p>
|
||||
<div class="src-code">
|
||||
<div class="src-code"><ol><li><div class="src-line"><a name="a1"></a><span class="src-php"><?php</span></div></li>
|
||||
<li><div class="src-line"><a name="a2"></a><span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a3"></a><span class="src-doc"> * Copyright (c) 2007-2011, Servigistics, Inc.</span></div></li>
|
||||
<li><div class="src-line"><a name="a4"></a><span class="src-doc"> * All rights reserved.</span></div></li>
|
||||
<li><div class="src-line"><a name="a5"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a6"></a><span class="src-doc"> * Redistribution and use in source and binary forms, with or without</span></div></li>
|
||||
<li><div class="src-line"><a name="a7"></a><span class="src-doc"> * modification, are permitted provided that the following conditions are met:</span></div></li>
|
||||
<li><div class="src-line"><a name="a8"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a9"></a><span class="src-doc"> * - Redistributions of source code must retain the above copyright notice,</span></div></li>
|
||||
<li><div class="src-line"><a name="a10"></a><span class="src-doc"> * this list of conditions and the following disclaimer.</span></div></li>
|
||||
<li><div class="src-line"><a name="a11"></a><span class="src-doc"> * - Redistributions in binary form must reproduce the above copyright</span></div></li>
|
||||
<li><div class="src-line"><a name="a12"></a><span class="src-doc"> * notice, this list of conditions and the following disclaimer in the</span></div></li>
|
||||
<li><div class="src-line"><a name="a13"></a><span class="src-doc"> * documentation and/or other materials provided with the distribution.</span></div></li>
|
||||
<li><div class="src-line"><a name="a14"></a><span class="src-doc"> * - Neither the name of Servigistics, Inc. nor the names of</span></div></li>
|
||||
<li><div class="src-line"><a name="a15"></a><span class="src-doc"> * its contributors may be used to endorse or promote products derived from</span></div></li>
|
||||
<li><div class="src-line"><a name="a16"></a><span class="src-doc"> * this software without specific prior written permission.</span></div></li>
|
||||
<li><div class="src-line"><a name="a17"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a18"></a><span class="src-doc"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"</span></div></li>
|
||||
<li><div class="src-line"><a name="a19"></a><span class="src-doc"> * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div></li>
|
||||
<li><div class="src-line"><a name="a20"></a><span class="src-doc"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div></li>
|
||||
<li><div class="src-line"><a name="a21"></a><span class="src-doc"> * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE</span></div></li>
|
||||
<li><div class="src-line"><a name="a22"></a><span class="src-doc"> * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div></li>
|
||||
<li><div class="src-line"><a name="a23"></a><span class="src-doc"> * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div></li>
|
||||
<li><div class="src-line"><a name="a24"></a><span class="src-doc"> * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div></li>
|
||||
<li><div class="src-line"><a name="a25"></a><span class="src-doc"> * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div></li>
|
||||
<li><div class="src-line"><a name="a26"></a><span class="src-doc"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div></li>
|
||||
<li><div class="src-line"><a name="a27"></a><span class="src-doc"> * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div></li>
|
||||
<li><div class="src-line"><a name="a28"></a><span class="src-doc"> * POSSIBILITY OF SUCH DAMAGE.</span></div></li>
|
||||
<li><div class="src-line"><a name="a29"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a30"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@copyright</span><span class="src-doc"> Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)</span></div></li>
|
||||
<li><div class="src-line"><a name="a31"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@license</span><span class="src-doc"> http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD</span></div></li>
|
||||
<li><div class="src-line"><a name="a32"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> $Id: $</span></div></li>
|
||||
<li><div class="src-line"><a name="a33"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a34"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@package</span><span class="src-doc"> Apache</span></div></li>
|
||||
<li><div class="src-line"><a name="a35"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@subpackage</span><span class="src-doc"> Solr</span></div></li>
|
||||
<li><div class="src-line"><a name="a36"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@author</span><span class="src-doc"> Timo Schmidt <timo.schmidt@aoemedia.de>, Donovan Jimenez <djimenez@conduit-it.com></span></div></li>
|
||||
<li><div class="src-line"><a name="a37"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a38"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a39"></a><span class="src-comm">// require Apache_Solr_HttpTransport_Response</span></div></li>
|
||||
<li><div class="src-line"><a name="a40"></a><span class="src-inc">require_once</span><span class="src-sym">(</span><span class="src-id">dirname</span><span class="src-sym">(</span>__FILE__<span class="src-sym">) </span>. <span class="src-str">'/Response.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a41"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a42"></a><span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a43"></a><span class="src-doc"> * Interface that all Transport (HTTP Requester) implementations must implement. These</span></div></li>
|
||||
<li><div class="src-line"><a name="a44"></a><span class="src-doc"> * Implementations can then be plugged into the Service instance in order to user their</span></div></li>
|
||||
<li><div class="src-line"><a name="a45"></a><span class="src-doc"> * the desired method for making HTTP requests</span></div></li>
|
||||
<li><div class="src-line"><a name="a46"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a47"></a><span class="src-key">interface </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Interface.html">Apache_Solr_HttpTransport_Interface</a></div></li>
|
||||
<li><div class="src-line"><a name="a48"></a><span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a49"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a50"></a><span class="src-doc"> * Get the current default timeout for all HTTP requests</span></div></li>
|
||||
<li><div class="src-line"><a name="a51"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a52"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">float </span></div></li>
|
||||
<li><div class="src-line"><a name="a53"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a54"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Interface.html#methodgetDefaultTimeout">getDefaultTimeout</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a55"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a56"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a57"></a><span class="src-doc"> * Set the current default timeout for all HTTP requests</span></div></li>
|
||||
<li><div class="src-line"><a name="a58"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a59"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">float </span><span class="src-doc-var">$timeout </span></div></li>
|
||||
<li><div class="src-line"><a name="a60"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a61"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Interface.html#methodsetDefaultTimeout">setDefaultTimeout</a><span class="src-sym">(</span><span class="src-var">$timeout</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a62"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a63"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a64"></a><span class="src-doc"> * Perform a GET HTTP operation with an optional timeout and return the response</span></div></li>
|
||||
<li><div class="src-line"><a name="a65"></a><span class="src-doc"> * contents, use getLastResponseHeaders to retrieve HTTP headers</span></div></li>
|
||||
<li><div class="src-line"><a name="a66"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a67"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$url </span></div></li>
|
||||
<li><div class="src-line"><a name="a68"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">float </span><span class="src-doc-var">$timeout </span></div></li>
|
||||
<li><div class="src-line"><a name="a69"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">Apache_Solr_HttpTransport_Response </span><span class="src-doc">HTTP response</span></div></li>
|
||||
<li><div class="src-line"><a name="a70"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a71"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Interface.html#methodperformGetRequest">performGetRequest</a><span class="src-sym">(</span><span class="src-var">$url</span><span class="src-sym">, </span><span class="src-var">$timeout </span>= <span class="src-id">false</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a72"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a73"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a74"></a><span class="src-doc"> * Perform a HEAD HTTP operation with an optional timeout and return the response</span></div></li>
|
||||
<li><div class="src-line"><a name="a75"></a><span class="src-doc"> * headers - NOTE: head requests have no response body</span></div></li>
|
||||
<li><div class="src-line"><a name="a76"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a77"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$url </span></div></li>
|
||||
<li><div class="src-line"><a name="a78"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">float </span><span class="src-doc-var">$timeout </span></div></li>
|
||||
<li><div class="src-line"><a name="a79"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">Apache_Solr_HttpTransport_Response </span><span class="src-doc">HTTP response</span></div></li>
|
||||
<li><div class="src-line"><a name="a80"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a81"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Interface.html#methodperformHeadRequest">performHeadRequest</a><span class="src-sym">(</span><span class="src-var">$url</span><span class="src-sym">, </span><span class="src-var">$timeout </span>= <span class="src-id">false</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a82"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a83"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a84"></a><span class="src-doc"> * Perform a POST HTTP operation with an optional timeout and return the response</span></div></li>
|
||||
<li><div class="src-line"><a name="a85"></a><span class="src-doc"> * contents, use getLastResponseHeaders to retrieve HTTP headers</span></div></li>
|
||||
<li><div class="src-line"><a name="a86"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a87"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$url </span></div></li>
|
||||
<li><div class="src-line"><a name="a88"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$rawPost </span></div></li>
|
||||
<li><div class="src-line"><a name="a89"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$contentType </span></div></li>
|
||||
<li><div class="src-line"><a name="a90"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">float </span><span class="src-doc-var">$timeout </span></div></li>
|
||||
<li><div class="src-line"><a name="a91"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">Apache_Solr_HttpTransport_Response </span><span class="src-doc">HTTP response</span></div></li>
|
||||
<li><div class="src-line"><a name="a92"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a93"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Interface.html#methodperformPostRequest">performPostRequest</a><span class="src-sym">(</span><span class="src-var">$url</span><span class="src-sym">, </span><span class="src-var">$rawPost</span><span class="src-sym">, </span><span class="src-var">$contentType</span><span class="src-sym">, </span><span class="src-var">$timeout </span>= <span class="src-id">false</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a94"></a><span class="src-sym">}</span></div></li>
|
||||
</ol></div>
|
||||
</div>
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:15 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,275 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>File Source for Response.php</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Source for file Response.php</h1>
|
||||
<p>Documentation is available at <a href="../Apache/Solr/_HttpTransport---Response.php.html">Response.php</a></p>
|
||||
<div class="src-code">
|
||||
<div class="src-code"><ol><li><div class="src-line"><a name="a1"></a><span class="src-php"><?php</span></div></li>
|
||||
<li><div class="src-line"><a name="a2"></a><span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a3"></a><span class="src-doc"> * Copyright (c) 2007-2011, Servigistics, Inc.</span></div></li>
|
||||
<li><div class="src-line"><a name="a4"></a><span class="src-doc"> * All rights reserved.</span></div></li>
|
||||
<li><div class="src-line"><a name="a5"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a6"></a><span class="src-doc"> * Redistribution and use in source and binary forms, with or without</span></div></li>
|
||||
<li><div class="src-line"><a name="a7"></a><span class="src-doc"> * modification, are permitted provided that the following conditions are met:</span></div></li>
|
||||
<li><div class="src-line"><a name="a8"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a9"></a><span class="src-doc"> * - Redistributions of source code must retain the above copyright notice,</span></div></li>
|
||||
<li><div class="src-line"><a name="a10"></a><span class="src-doc"> * this list of conditions and the following disclaimer.</span></div></li>
|
||||
<li><div class="src-line"><a name="a11"></a><span class="src-doc"> * - Redistributions in binary form must reproduce the above copyright</span></div></li>
|
||||
<li><div class="src-line"><a name="a12"></a><span class="src-doc"> * notice, this list of conditions and the following disclaimer in the</span></div></li>
|
||||
<li><div class="src-line"><a name="a13"></a><span class="src-doc"> * documentation and/or other materials provided with the distribution.</span></div></li>
|
||||
<li><div class="src-line"><a name="a14"></a><span class="src-doc"> * - Neither the name of Servigistics, Inc. nor the names of</span></div></li>
|
||||
<li><div class="src-line"><a name="a15"></a><span class="src-doc"> * its contributors may be used to endorse or promote products derived from</span></div></li>
|
||||
<li><div class="src-line"><a name="a16"></a><span class="src-doc"> * this software without specific prior written permission.</span></div></li>
|
||||
<li><div class="src-line"><a name="a17"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a18"></a><span class="src-doc"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"</span></div></li>
|
||||
<li><div class="src-line"><a name="a19"></a><span class="src-doc"> * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div></li>
|
||||
<li><div class="src-line"><a name="a20"></a><span class="src-doc"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div></li>
|
||||
<li><div class="src-line"><a name="a21"></a><span class="src-doc"> * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE</span></div></li>
|
||||
<li><div class="src-line"><a name="a22"></a><span class="src-doc"> * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div></li>
|
||||
<li><div class="src-line"><a name="a23"></a><span class="src-doc"> * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div></li>
|
||||
<li><div class="src-line"><a name="a24"></a><span class="src-doc"> * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div></li>
|
||||
<li><div class="src-line"><a name="a25"></a><span class="src-doc"> * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div></li>
|
||||
<li><div class="src-line"><a name="a26"></a><span class="src-doc"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div></li>
|
||||
<li><div class="src-line"><a name="a27"></a><span class="src-doc"> * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div></li>
|
||||
<li><div class="src-line"><a name="a28"></a><span class="src-doc"> * POSSIBILITY OF SUCH DAMAGE.</span></div></li>
|
||||
<li><div class="src-line"><a name="a29"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a30"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@copyright</span><span class="src-doc"> Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)</span></div></li>
|
||||
<li><div class="src-line"><a name="a31"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@license</span><span class="src-doc"> http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD</span></div></li>
|
||||
<li><div class="src-line"><a name="a32"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> $Id: $</span></div></li>
|
||||
<li><div class="src-line"><a name="a33"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a34"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@package</span><span class="src-doc"> Apache</span></div></li>
|
||||
<li><div class="src-line"><a name="a35"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@subpackage</span><span class="src-doc"> Solr</span></div></li>
|
||||
<li><div class="src-line"><a name="a36"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@author</span><span class="src-doc"> Donovan Jimenez <djimenez@conduit-it.com></span></div></li>
|
||||
<li><div class="src-line"><a name="a37"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a38"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a39"></a><span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a40"></a><span class="src-doc"> * Represents the required pieces of an HTTP response provided by HTTP transport</span></div></li>
|
||||
<li><div class="src-line"><a name="a41"></a><span class="src-doc"> * implementations and then consumed by the Apache_Solr_Response class which provides</span></div></li>
|
||||
<li><div class="src-line"><a name="a42"></a><span class="src-doc"> * decoding</span></div></li>
|
||||
<li><div class="src-line"><a name="a43"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a44"></a><span class="src-key">class </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Response.html">Apache_Solr_HttpTransport_Response</a></div></li>
|
||||
<li><div class="src-line"><a name="a45"></a><span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a46"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a47"></a><span class="src-doc"> * Status Messages indexed by Status Code</span></div></li>
|
||||
<li><div class="src-line"><a name="a48"></a><span class="src-doc"> * Obtained from: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html</span></div></li>
|
||||
<li><div class="src-line"><a name="a49"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a50"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">array </span></div></li>
|
||||
<li><div class="src-line"><a name="a51"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a52"></a> <span class="src-key">static </span><span class="src-key">private </span><span class="src-var">$_defaultStatusMessages </span>= <span class="src-key">array</span><span class="src-sym">(</span></div></li>
|
||||
<li><div class="src-line"><a name="a53"></a> <span class="src-comm">// Specific to PHP Solr Client</span></div></li>
|
||||
<li><div class="src-line"><a name="a54"></a> <span class="src-num">0 </span>=> <span class="src-str">"Communication Error"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a55"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a56"></a> <span class="src-comm">// Informational 1XX</span></div></li>
|
||||
<li><div class="src-line"><a name="a57"></a> <span class="src-num">100 </span>=> <span class="src-str">"Continue"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a58"></a> <span class="src-num">101 </span>=> <span class="src-str">"Switching Protocols"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a59"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a60"></a> <span class="src-comm">// Successful 2XX</span></div></li>
|
||||
<li><div class="src-line"><a name="a61"></a> <span class="src-num">200 </span>=> <span class="src-str">"OK"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a62"></a> <span class="src-num">201 </span>=> <span class="src-str">"Created"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a63"></a> <span class="src-num">202 </span>=> <span class="src-str">"Accepted"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a64"></a> <span class="src-num">203 </span>=> <span class="src-str">"Non-Authoritative Information"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a65"></a> <span class="src-num">204 </span>=> <span class="src-str">"No Content"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a66"></a> <span class="src-num">205 </span>=> <span class="src-str">"Reset Content"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a67"></a> <span class="src-num">206 </span>=> <span class="src-str">"Partial Content"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a68"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a69"></a> <span class="src-comm">// Redirection 3XX</span></div></li>
|
||||
<li><div class="src-line"><a name="a70"></a> <span class="src-num">300 </span>=> <span class="src-str">"Multiple Choices"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a71"></a> <span class="src-num">301 </span>=> <span class="src-str">"Moved Permanently"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a72"></a> <span class="src-num">302 </span>=> <span class="src-str">"Found"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a73"></a> <span class="src-num">303 </span>=> <span class="src-str">"See Other"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a74"></a> <span class="src-num">304 </span>=> <span class="src-str">"Not Modified"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a75"></a> <span class="src-num">305 </span>=> <span class="src-str">"Use Proxy"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a76"></a> <span class="src-num">307 </span>=> <span class="src-str">"Temporary Redirect"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a77"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a78"></a> <span class="src-comm">// Client Error 4XX</span></div></li>
|
||||
<li><div class="src-line"><a name="a79"></a> <span class="src-num">400 </span>=> <span class="src-str">"Bad Request"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a80"></a> <span class="src-num">401 </span>=> <span class="src-str">"Unauthorized"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a81"></a> <span class="src-num">402 </span>=> <span class="src-str">"Payment Required"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a82"></a> <span class="src-num">403 </span>=> <span class="src-str">"Forbidden"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a83"></a> <span class="src-num">404 </span>=> <span class="src-str">"Not Found"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a84"></a> <span class="src-num">405 </span>=> <span class="src-str">"Method Not Allowed"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a85"></a> <span class="src-num">406 </span>=> <span class="src-str">"Not Acceptable"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a86"></a> <span class="src-num">407 </span>=> <span class="src-str">"Proxy Authentication Required"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a87"></a> <span class="src-num">408 </span>=> <span class="src-str">"Request Timeout"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a88"></a> <span class="src-num">409 </span>=> <span class="src-str">"Conflict"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a89"></a> <span class="src-num">410 </span>=> <span class="src-str">"Gone"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a90"></a> <span class="src-num">411 </span>=> <span class="src-str">"Length Required"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a91"></a> <span class="src-num">412 </span>=> <span class="src-str">"Precondition Failed"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a92"></a> <span class="src-num">413 </span>=> <span class="src-str">"Request Entity Too Large"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a93"></a> <span class="src-num">414 </span>=> <span class="src-str">"Request-URI Too Long"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a94"></a> <span class="src-num">415 </span>=> <span class="src-str">"Unsupported Media Type"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a95"></a> <span class="src-num">416 </span>=> <span class="src-str">"Request Range Not Satisfiable"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a96"></a> <span class="src-num">417 </span>=> <span class="src-str">"Expectation Failed"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a97"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a98"></a> <span class="src-comm">// Server Error 5XX</span></div></li>
|
||||
<li><div class="src-line"><a name="a99"></a> <span class="src-num">500 </span>=> <span class="src-str">"Internal Server Error"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a100"></a> <span class="src-num">501 </span>=> <span class="src-str">"Not Implemented"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a101"></a> <span class="src-num">502 </span>=> <span class="src-str">"Bad Gateway"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a102"></a> <span class="src-num">503 </span>=> <span class="src-str">"Service Unavailable"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a103"></a> <span class="src-num">504 </span>=> <span class="src-str">"Gateway Timeout"</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a104"></a> <span class="src-num">505 </span>=> <span class="src-str">"HTTP Version Not Supported"</span></div></li>
|
||||
<li><div class="src-line"><a name="a105"></a> <span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a106"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a107"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a108"></a><span class="src-doc"> * Get the HTTP status message based on status code</span></div></li>
|
||||
<li><div class="src-line"><a name="a109"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a110"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></div></li>
|
||||
<li><div class="src-line"><a name="a111"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a112"></a> <span class="src-key">public </span><span class="src-key">static </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Response.html#methodgetDefaultStatusMessage">getDefaultStatusMessage</a><span class="src-sym">(</span><span class="src-var">$statusCode</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a113"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a114"></a> <span class="src-var">$statusCode </span>= (int) <span class="src-var">$statusCode</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a115"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a116"></a> <span class="src-key">if </span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-var">$_defaultStatusMessages</span><span class="src-sym">[</span><span class="src-var">$statusCode</span><span class="src-sym">]</span><span class="src-sym">))</span></div></li>
|
||||
<li><div class="src-line"><a name="a117"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a118"></a> <span class="src-key">return </span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-var">$_defaultStatusMessages</span><span class="src-sym">[</span><span class="src-var">$statusCode</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a119"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a120"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a121"></a> <span class="src-key">return </span><span class="src-str">"Unknown Status"</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a122"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a123"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a124"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a125"></a><span class="src-doc"> * The response's HTTP status code</span></div></li>
|
||||
<li><div class="src-line"><a name="a126"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a127"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">integer </span></div></li>
|
||||
<li><div class="src-line"><a name="a128"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a129"></a> <span class="src-key">private </span><span class="src-var">$_statusCode</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a130"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a131"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a132"></a><span class="src-doc"> * The response's HTTP status message</span></div></li>
|
||||
<li><div class="src-line"><a name="a133"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a134"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></div></li>
|
||||
<li><div class="src-line"><a name="a135"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a136"></a> <span class="src-key">private </span><span class="src-var">$_statusMessage</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a137"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a138"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a139"></a><span class="src-doc"> * The response's mime type</span></div></li>
|
||||
<li><div class="src-line"><a name="a140"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a141"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></div></li>
|
||||
<li><div class="src-line"><a name="a142"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a143"></a> <span class="src-key">private </span><span class="src-var">$_mimeType</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a144"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a145"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a146"></a><span class="src-doc"> * The response's character encoding</span></div></li>
|
||||
<li><div class="src-line"><a name="a147"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a148"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></div></li>
|
||||
<li><div class="src-line"><a name="a149"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a150"></a> <span class="src-key">private </span><span class="src-var">$_encoding</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a151"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a152"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a153"></a><span class="src-doc"> * The response's data</span></div></li>
|
||||
<li><div class="src-line"><a name="a154"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a155"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">string </span></div></li>
|
||||
<li><div class="src-line"><a name="a156"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a157"></a> <span class="src-key">private </span><span class="src-var">$_responseBody</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a158"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a159"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a160"></a><span class="src-doc"> * Construct a HTTP transport response</span></div></li>
|
||||
<li><div class="src-line"><a name="a161"></a><span class="src-doc"> * </span></div></li>
|
||||
<li><div class="src-line"><a name="a162"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">integer </span><span class="src-doc-var">$statusCode </span><span class="src-doc">The HTTP status code</span></div></li>
|
||||
<li><div class="src-line"><a name="a163"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$contentType </span><span class="src-doc">The VALUE of the Content-Type HTTP header</span></div></li>
|
||||
<li><div class="src-line"><a name="a164"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$responseBody </span><span class="src-doc">The body of the HTTP response</span></div></li>
|
||||
<li><div class="src-line"><a name="a165"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a166"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Response.html#method__construct">__construct</a><span class="src-sym">(</span><span class="src-var">$statusCode</span><span class="src-sym">, </span><span class="src-var">$contentType</span><span class="src-sym">, </span><span class="src-var">$responseBody</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a167"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a168"></a> <span class="src-comm">// set the status code, make sure its an integer</span></div></li>
|
||||
<li><div class="src-line"><a name="a169"></a> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_statusCode </span>= (int) <span class="src-var">$statusCode</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a170"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a171"></a> <span class="src-comm">// lookup up status message based on code</span></div></li>
|
||||
<li><div class="src-line"><a name="a172"></a> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_statusMessage </span>= <span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">getDefaultStatusMessage</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_statusCode</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a173"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a174"></a> <span class="src-comm">// set the response body, it should always be a string</span></div></li>
|
||||
<li><div class="src-line"><a name="a175"></a> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_responseBody </span>= (string) <span class="src-var">$responseBody</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a176"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a177"></a> <span class="src-comm">// parse the content type header value for mimetype and encoding</span></div></li>
|
||||
<li><div class="src-line"><a name="a178"></a> <span class="src-comm">// first set default values that will remain if we can't find</span></div></li>
|
||||
<li><div class="src-line"><a name="a179"></a> <span class="src-comm">// what we're looking for in the content type</span></div></li>
|
||||
<li><div class="src-line"><a name="a180"></a> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_mimeType </span>= <span class="src-str">"text/plain"</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a181"></a> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_encoding </span>= <span class="src-str">"UTF-8"</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a182"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a183"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$contentType</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a184"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a185"></a> <span class="src-comm">// now break apart the header to see if there's character encoding</span></div></li>
|
||||
<li><div class="src-line"><a name="a186"></a> <span class="src-var">$contentTypeParts </span>= <a href="http://www.php.net/explode">explode</a><span class="src-sym">(</span><span class="src-str">';'</span><span class="src-sym">, </span><span class="src-var">$contentType</span><span class="src-sym">, </span><span class="src-num">2</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a187"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a188"></a> <span class="src-key">if </span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$contentTypeParts</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">))</span></div></li>
|
||||
<li><div class="src-line"><a name="a189"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a190"></a> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_mimeType </span>= <a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-var">$contentTypeParts</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a191"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a192"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a193"></a> <span class="src-key">if </span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$contentTypeParts</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">))</span></div></li>
|
||||
<li><div class="src-line"><a name="a194"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a195"></a> <span class="src-comm">// we have a second part, split it further</span></div></li>
|
||||
<li><div class="src-line"><a name="a196"></a> <span class="src-var">$contentTypeParts </span>= <a href="http://www.php.net/explode">explode</a><span class="src-sym">(</span><span class="src-str">'='</span><span class="src-sym">, </span><span class="src-var">$contentTypeParts</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a197"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a198"></a> <span class="src-key">if </span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$contentTypeParts</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">))</span></div></li>
|
||||
<li><div class="src-line"><a name="a199"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a200"></a> <span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_encoding </span>= <a href="http://www.php.net/trim">trim</a><span class="src-sym">(</span><span class="src-var">$contentTypeParts</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a201"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a202"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a203"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a204"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a205"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a206"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a207"></a><span class="src-doc"> * Get the status code of the response</span></div></li>
|
||||
<li><div class="src-line"><a name="a208"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a209"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">integer </span></div></li>
|
||||
<li><div class="src-line"><a name="a210"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a211"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Response.html#methodgetStatusCode">getStatusCode</a><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a212"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a213"></a> <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_statusCode</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a214"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a215"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a216"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a217"></a><span class="src-doc"> * Get the status message of the response</span></div></li>
|
||||
<li><div class="src-line"><a name="a218"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a219"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></div></li>
|
||||
<li><div class="src-line"><a name="a220"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a221"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Response.html#methodgetStatusMessage">getStatusMessage</a><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a222"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a223"></a> <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_statusMessage</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a224"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a225"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a226"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a227"></a><span class="src-doc"> * Get the mimetype of the response body</span></div></li>
|
||||
<li><div class="src-line"><a name="a228"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a229"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></div></li>
|
||||
<li><div class="src-line"><a name="a230"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a231"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Response.html#methodgetMimeType">getMimeType</a><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a232"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a233"></a> <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_mimeType</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a234"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a235"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a236"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a237"></a><span class="src-doc"> * Get the charset encoding of the response body.</span></div></li>
|
||||
<li><div class="src-line"><a name="a238"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a239"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></div></li>
|
||||
<li><div class="src-line"><a name="a240"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a241"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Response.html#methodgetEncoding">getEncoding</a><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a242"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a243"></a> <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_encoding</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a244"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a245"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a246"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a247"></a><span class="src-doc"> * Get the raw response body</span></div></li>
|
||||
<li><div class="src-line"><a name="a248"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a249"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></div></li>
|
||||
<li><div class="src-line"><a name="a250"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a251"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Response.html#methodgetBody">getBody</a><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a252"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a253"></a> <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-></span><span class="src-var">_responseBody</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a254"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a255"></a><span class="src-sym">}</span></div></li>
|
||||
</ol></div>
|
||||
</div>
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:16 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>File Source for InvalidArgumentException.php</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Source for file InvalidArgumentException.php</h1>
|
||||
<p>Documentation is available at <a href="../Apache/Solr/_InvalidArgumentException.php.html">InvalidArgumentException.php</a></p>
|
||||
<div class="src-code">
|
||||
<div class="src-code"><ol><li><div class="src-line"><a name="a1"></a><span class="src-php"><?php</span></div></li>
|
||||
<li><div class="src-line"><a name="a2"></a><span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a3"></a><span class="src-doc"> * Copyright (c) 2007-2011, Servigistics, Inc.</span></div></li>
|
||||
<li><div class="src-line"><a name="a4"></a><span class="src-doc"> * All rights reserved.</span></div></li>
|
||||
<li><div class="src-line"><a name="a5"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a6"></a><span class="src-doc"> * Redistribution and use in source and binary forms, with or without</span></div></li>
|
||||
<li><div class="src-line"><a name="a7"></a><span class="src-doc"> * modification, are permitted provided that the following conditions are met:</span></div></li>
|
||||
<li><div class="src-line"><a name="a8"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a9"></a><span class="src-doc"> * - Redistributions of source code must retain the above copyright notice,</span></div></li>
|
||||
<li><div class="src-line"><a name="a10"></a><span class="src-doc"> * this list of conditions and the following disclaimer.</span></div></li>
|
||||
<li><div class="src-line"><a name="a11"></a><span class="src-doc"> * - Redistributions in binary form must reproduce the above copyright</span></div></li>
|
||||
<li><div class="src-line"><a name="a12"></a><span class="src-doc"> * notice, this list of conditions and the following disclaimer in the</span></div></li>
|
||||
<li><div class="src-line"><a name="a13"></a><span class="src-doc"> * documentation and/or other materials provided with the distribution.</span></div></li>
|
||||
<li><div class="src-line"><a name="a14"></a><span class="src-doc"> * - Neither the name of Servigistics, Inc. nor the names of</span></div></li>
|
||||
<li><div class="src-line"><a name="a15"></a><span class="src-doc"> * its contributors may be used to endorse or promote products derived from</span></div></li>
|
||||
<li><div class="src-line"><a name="a16"></a><span class="src-doc"> * this software without specific prior written permission.</span></div></li>
|
||||
<li><div class="src-line"><a name="a17"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a18"></a><span class="src-doc"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"</span></div></li>
|
||||
<li><div class="src-line"><a name="a19"></a><span class="src-doc"> * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div></li>
|
||||
<li><div class="src-line"><a name="a20"></a><span class="src-doc"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div></li>
|
||||
<li><div class="src-line"><a name="a21"></a><span class="src-doc"> * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE</span></div></li>
|
||||
<li><div class="src-line"><a name="a22"></a><span class="src-doc"> * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div></li>
|
||||
<li><div class="src-line"><a name="a23"></a><span class="src-doc"> * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div></li>
|
||||
<li><div class="src-line"><a name="a24"></a><span class="src-doc"> * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div></li>
|
||||
<li><div class="src-line"><a name="a25"></a><span class="src-doc"> * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div></li>
|
||||
<li><div class="src-line"><a name="a26"></a><span class="src-doc"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div></li>
|
||||
<li><div class="src-line"><a name="a27"></a><span class="src-doc"> * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div></li>
|
||||
<li><div class="src-line"><a name="a28"></a><span class="src-doc"> * POSSIBILITY OF SUCH DAMAGE.</span></div></li>
|
||||
<li><div class="src-line"><a name="a29"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a30"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@copyright</span><span class="src-doc"> Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)</span></div></li>
|
||||
<li><div class="src-line"><a name="a31"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@license</span><span class="src-doc"> http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD</span></div></li>
|
||||
<li><div class="src-line"><a name="a32"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> $Id: InvalidArgumentException.php 54 2011-02-04 16:29:18Z donovan.jimenez $</span></div></li>
|
||||
<li><div class="src-line"><a name="a33"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a34"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@package</span><span class="src-doc"> Apache</span></div></li>
|
||||
<li><div class="src-line"><a name="a35"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@subpackage</span><span class="src-doc"> Solr</span></div></li>
|
||||
<li><div class="src-line"><a name="a36"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@author</span><span class="src-doc"> Donovan Jimenez <djimenez@conduit-it.com></span></div></li>
|
||||
<li><div class="src-line"><a name="a37"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a38"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a39"></a><span class="src-key">class </span><a href="../Apache/Solr/Apache_Solr_InvalidArgumentException.html">Apache_Solr_InvalidArgumentException</a> <span class="src-key">extends </span><a href="../Apache/Solr/Apache_Solr_Exception.html">Apache_Solr_Exception</a></div></li>
|
||||
<li><div class="src-line"><a name="a40"></a><span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a41"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a42"></a><span class="src-doc"> * SVN Revision meta data for this class</span></div></li>
|
||||
<li><div class="src-line"><a name="a43"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a44"></a> <span class="src-key">const </span><a href="../Apache/Solr/Apache_Solr_InvalidArgumentException.html#constSVN_REVISION">SVN_REVISION</a> = <span class="src-str">'$Revision: 54 $'</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a45"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a46"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a47"></a><span class="src-doc"> * SVN ID meta data for this class</span></div></li>
|
||||
<li><div class="src-line"><a name="a48"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a49"></a> <span class="src-key">const </span><a href="../Apache/Solr/Apache_Solr_InvalidArgumentException.html#constSVN_ID">SVN_ID</a> = <span class="src-str">'$Id: InvalidArgumentException.php 54 2011-02-04 16:29:18Z donovan.jimenez $'</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a50"></a><span class="src-sym">}</span></div></li>
|
||||
</ol></div>
|
||||
</div>
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:15 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>File Source for NoServiceAvailableException.php</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Source for file NoServiceAvailableException.php</h1>
|
||||
<p>Documentation is available at <a href="../Apache/Solr/_NoServiceAvailableException.php.html">NoServiceAvailableException.php</a></p>
|
||||
<div class="src-code">
|
||||
<div class="src-code"><ol><li><div class="src-line"><a name="a1"></a><span class="src-php"><?php</span></div></li>
|
||||
<li><div class="src-line"><a name="a2"></a><span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a3"></a><span class="src-doc"> * Copyright (c) 2007-2011, Servigistics, Inc.</span></div></li>
|
||||
<li><div class="src-line"><a name="a4"></a><span class="src-doc"> * All rights reserved.</span></div></li>
|
||||
<li><div class="src-line"><a name="a5"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a6"></a><span class="src-doc"> * Redistribution and use in source and binary forms, with or without</span></div></li>
|
||||
<li><div class="src-line"><a name="a7"></a><span class="src-doc"> * modification, are permitted provided that the following conditions are met:</span></div></li>
|
||||
<li><div class="src-line"><a name="a8"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a9"></a><span class="src-doc"> * - Redistributions of source code must retain the above copyright notice,</span></div></li>
|
||||
<li><div class="src-line"><a name="a10"></a><span class="src-doc"> * this list of conditions and the following disclaimer.</span></div></li>
|
||||
<li><div class="src-line"><a name="a11"></a><span class="src-doc"> * - Redistributions in binary form must reproduce the above copyright</span></div></li>
|
||||
<li><div class="src-line"><a name="a12"></a><span class="src-doc"> * notice, this list of conditions and the following disclaimer in the</span></div></li>
|
||||
<li><div class="src-line"><a name="a13"></a><span class="src-doc"> * documentation and/or other materials provided with the distribution.</span></div></li>
|
||||
<li><div class="src-line"><a name="a14"></a><span class="src-doc"> * - Neither the name of Servigistics, Inc. nor the names of</span></div></li>
|
||||
<li><div class="src-line"><a name="a15"></a><span class="src-doc"> * its contributors may be used to endorse or promote products derived from</span></div></li>
|
||||
<li><div class="src-line"><a name="a16"></a><span class="src-doc"> * this software without specific prior written permission.</span></div></li>
|
||||
<li><div class="src-line"><a name="a17"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a18"></a><span class="src-doc"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"</span></div></li>
|
||||
<li><div class="src-line"><a name="a19"></a><span class="src-doc"> * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div></li>
|
||||
<li><div class="src-line"><a name="a20"></a><span class="src-doc"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div></li>
|
||||
<li><div class="src-line"><a name="a21"></a><span class="src-doc"> * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE</span></div></li>
|
||||
<li><div class="src-line"><a name="a22"></a><span class="src-doc"> * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div></li>
|
||||
<li><div class="src-line"><a name="a23"></a><span class="src-doc"> * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div></li>
|
||||
<li><div class="src-line"><a name="a24"></a><span class="src-doc"> * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div></li>
|
||||
<li><div class="src-line"><a name="a25"></a><span class="src-doc"> * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div></li>
|
||||
<li><div class="src-line"><a name="a26"></a><span class="src-doc"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div></li>
|
||||
<li><div class="src-line"><a name="a27"></a><span class="src-doc"> * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div></li>
|
||||
<li><div class="src-line"><a name="a28"></a><span class="src-doc"> * POSSIBILITY OF SUCH DAMAGE.</span></div></li>
|
||||
<li><div class="src-line"><a name="a29"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a30"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@copyright</span><span class="src-doc"> Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)</span></div></li>
|
||||
<li><div class="src-line"><a name="a31"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@license</span><span class="src-doc"> http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD</span></div></li>
|
||||
<li><div class="src-line"><a name="a32"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> $Id: NoServiceAvailableException.php 54 2011-02-04 16:29:18Z donovan.jimenez $</span></div></li>
|
||||
<li><div class="src-line"><a name="a33"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a34"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@package</span><span class="src-doc"> Apache</span></div></li>
|
||||
<li><div class="src-line"><a name="a35"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@subpackage</span><span class="src-doc"> Solr</span></div></li>
|
||||
<li><div class="src-line"><a name="a36"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@author</span><span class="src-doc"> Donovan Jimenez <djimenez@conduit-it.com></span></div></li>
|
||||
<li><div class="src-line"><a name="a37"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a38"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a39"></a><span class="src-key">class </span><a href="../Apache/Solr/Apache_Solr_NoServiceAvailableException.html">Apache_Solr_NoServiceAvailableException</a> <span class="src-key">extends </span><a href="../Apache/Solr/Apache_Solr_Exception.html">Apache_Solr_Exception</a></div></li>
|
||||
<li><div class="src-line"><a name="a40"></a><span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a41"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a42"></a><span class="src-doc"> * SVN Revision meta data for this class</span></div></li>
|
||||
<li><div class="src-line"><a name="a43"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a44"></a> <span class="src-key">const </span><a href="../Apache/Solr/Apache_Solr_NoServiceAvailableException.html#constSVN_REVISION">SVN_REVISION</a> = <span class="src-str">'$Revision: 54 $'</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a45"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a46"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a47"></a><span class="src-doc"> * SVN ID meta data for this class</span></div></li>
|
||||
<li><div class="src-line"><a name="a48"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a49"></a> <span class="src-key">const </span><a href="../Apache/Solr/Apache_Solr_NoServiceAvailableException.html#constSVN_ID">SVN_ID</a> = <span class="src-str">'$Id: NoServiceAvailableException.php 54 2011-02-04 16:29:18Z donovan.jimenez $'</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a50"></a><span class="src-sym">}</span></div></li>
|
||||
</ol></div>
|
||||
</div>
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:15 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>File Source for ParserException.php</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Source for file ParserException.php</h1>
|
||||
<p>Documentation is available at <a href="../Apache/Solr/_ParserException.php.html">ParserException.php</a></p>
|
||||
<div class="src-code">
|
||||
<div class="src-code"><ol><li><div class="src-line"><a name="a1"></a><span class="src-php"><?php</span></div></li>
|
||||
<li><div class="src-line"><a name="a2"></a><span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a3"></a><span class="src-doc"> * Copyright (c) 2007-2011, Servigistics, Inc.</span></div></li>
|
||||
<li><div class="src-line"><a name="a4"></a><span class="src-doc"> * All rights reserved.</span></div></li>
|
||||
<li><div class="src-line"><a name="a5"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a6"></a><span class="src-doc"> * Redistribution and use in source and binary forms, with or without</span></div></li>
|
||||
<li><div class="src-line"><a name="a7"></a><span class="src-doc"> * modification, are permitted provided that the following conditions are met:</span></div></li>
|
||||
<li><div class="src-line"><a name="a8"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a9"></a><span class="src-doc"> * - Redistributions of source code must retain the above copyright notice,</span></div></li>
|
||||
<li><div class="src-line"><a name="a10"></a><span class="src-doc"> * this list of conditions and the following disclaimer.</span></div></li>
|
||||
<li><div class="src-line"><a name="a11"></a><span class="src-doc"> * - Redistributions in binary form must reproduce the above copyright</span></div></li>
|
||||
<li><div class="src-line"><a name="a12"></a><span class="src-doc"> * notice, this list of conditions and the following disclaimer in the</span></div></li>
|
||||
<li><div class="src-line"><a name="a13"></a><span class="src-doc"> * documentation and/or other materials provided with the distribution.</span></div></li>
|
||||
<li><div class="src-line"><a name="a14"></a><span class="src-doc"> * - Neither the name of Servigistics, Inc. nor the names of</span></div></li>
|
||||
<li><div class="src-line"><a name="a15"></a><span class="src-doc"> * its contributors may be used to endorse or promote products derived from</span></div></li>
|
||||
<li><div class="src-line"><a name="a16"></a><span class="src-doc"> * this software without specific prior written permission.</span></div></li>
|
||||
<li><div class="src-line"><a name="a17"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a18"></a><span class="src-doc"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"</span></div></li>
|
||||
<li><div class="src-line"><a name="a19"></a><span class="src-doc"> * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div></li>
|
||||
<li><div class="src-line"><a name="a20"></a><span class="src-doc"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div></li>
|
||||
<li><div class="src-line"><a name="a21"></a><span class="src-doc"> * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE</span></div></li>
|
||||
<li><div class="src-line"><a name="a22"></a><span class="src-doc"> * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div></li>
|
||||
<li><div class="src-line"><a name="a23"></a><span class="src-doc"> * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div></li>
|
||||
<li><div class="src-line"><a name="a24"></a><span class="src-doc"> * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div></li>
|
||||
<li><div class="src-line"><a name="a25"></a><span class="src-doc"> * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div></li>
|
||||
<li><div class="src-line"><a name="a26"></a><span class="src-doc"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div></li>
|
||||
<li><div class="src-line"><a name="a27"></a><span class="src-doc"> * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div></li>
|
||||
<li><div class="src-line"><a name="a28"></a><span class="src-doc"> * POSSIBILITY OF SUCH DAMAGE.</span></div></li>
|
||||
<li><div class="src-line"><a name="a29"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a30"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@copyright</span><span class="src-doc"> Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)</span></div></li>
|
||||
<li><div class="src-line"><a name="a31"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@license</span><span class="src-doc"> http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD</span></div></li>
|
||||
<li><div class="src-line"><a name="a32"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> $Id: ParserException.php 54 2011-02-04 16:29:18Z donovan.jimenez $</span></div></li>
|
||||
<li><div class="src-line"><a name="a33"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a34"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@package</span><span class="src-doc"> Apache</span></div></li>
|
||||
<li><div class="src-line"><a name="a35"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@subpackage</span><span class="src-doc"> Solr</span></div></li>
|
||||
<li><div class="src-line"><a name="a36"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@author</span><span class="src-doc"> Donovan Jimenez <djimenez@conduit-it.com></span></div></li>
|
||||
<li><div class="src-line"><a name="a37"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a38"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a39"></a><span class="src-key">class </span><a href="../Apache/Solr/Apache_Solr_ParserException.html">Apache_Solr_ParserException</a> <span class="src-key">extends </span><a href="../Apache/Solr/Apache_Solr_Exception.html">Apache_Solr_Exception</a></div></li>
|
||||
<li><div class="src-line"><a name="a40"></a><span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a41"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a42"></a><span class="src-doc"> * SVN Revision meta data for this class</span></div></li>
|
||||
<li><div class="src-line"><a name="a43"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a44"></a> <span class="src-key">const </span><a href="../Apache/Solr/Apache_Solr_ParserException.html#constSVN_REVISION">SVN_REVISION</a> = <span class="src-str">'$Revision: 54 $'</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a45"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a46"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a47"></a><span class="src-doc"> * SVN ID meta data for this class</span></div></li>
|
||||
<li><div class="src-line"><a name="a48"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a49"></a> <span class="src-key">const </span><a href="../Apache/Solr/Apache_Solr_ParserException.html#constSVN_ID">SVN_ID</a> = <span class="src-str">'$Id: ParserException.php 54 2011-02-04 16:29:18Z donovan.jimenez $'</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a50"></a><span class="src-sym">}</span></div></li>
|
||||
</ol></div>
|
||||
</div>
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:15 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,267 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>File Source for Response.php</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Source for file Response.php</h1>
|
||||
<p>Documentation is available at <a href="../Apache/Solr/_Response.php.html">Response.php</a></p>
|
||||
<div class="src-code">
|
||||
<div class="src-code"><ol><li><div class="src-line"><a name="a1"></a><span class="src-php"><?php</span></div></li>
|
||||
<li><div class="src-line"><a name="a2"></a><span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a3"></a><span class="src-doc"> * Copyright (c) 2007-2011, Servigistics, Inc.</span></div></li>
|
||||
<li><div class="src-line"><a name="a4"></a><span class="src-doc"> * All rights reserved.</span></div></li>
|
||||
<li><div class="src-line"><a name="a5"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a6"></a><span class="src-doc"> * Redistribution and use in source and binary forms, with or without</span></div></li>
|
||||
<li><div class="src-line"><a name="a7"></a><span class="src-doc"> * modification, are permitted provided that the following conditions are met:</span></div></li>
|
||||
<li><div class="src-line"><a name="a8"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a9"></a><span class="src-doc"> * - Redistributions of source code must retain the above copyright notice,</span></div></li>
|
||||
<li><div class="src-line"><a name="a10"></a><span class="src-doc"> * this list of conditions and the following disclaimer.</span></div></li>
|
||||
<li><div class="src-line"><a name="a11"></a><span class="src-doc"> * - Redistributions in binary form must reproduce the above copyright</span></div></li>
|
||||
<li><div class="src-line"><a name="a12"></a><span class="src-doc"> * notice, this list of conditions and the following disclaimer in the</span></div></li>
|
||||
<li><div class="src-line"><a name="a13"></a><span class="src-doc"> * documentation and/or other materials provided with the distribution.</span></div></li>
|
||||
<li><div class="src-line"><a name="a14"></a><span class="src-doc"> * - Neither the name of Servigistics, Inc. nor the names of</span></div></li>
|
||||
<li><div class="src-line"><a name="a15"></a><span class="src-doc"> * its contributors may be used to endorse or promote products derived from</span></div></li>
|
||||
<li><div class="src-line"><a name="a16"></a><span class="src-doc"> * this software without specific prior written permission.</span></div></li>
|
||||
<li><div class="src-line"><a name="a17"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a18"></a><span class="src-doc"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"</span></div></li>
|
||||
<li><div class="src-line"><a name="a19"></a><span class="src-doc"> * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div></li>
|
||||
<li><div class="src-line"><a name="a20"></a><span class="src-doc"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div></li>
|
||||
<li><div class="src-line"><a name="a21"></a><span class="src-doc"> * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE</span></div></li>
|
||||
<li><div class="src-line"><a name="a22"></a><span class="src-doc"> * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div></li>
|
||||
<li><div class="src-line"><a name="a23"></a><span class="src-doc"> * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div></li>
|
||||
<li><div class="src-line"><a name="a24"></a><span class="src-doc"> * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div></li>
|
||||
<li><div class="src-line"><a name="a25"></a><span class="src-doc"> * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div></li>
|
||||
<li><div class="src-line"><a name="a26"></a><span class="src-doc"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div></li>
|
||||
<li><div class="src-line"><a name="a27"></a><span class="src-doc"> * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div></li>
|
||||
<li><div class="src-line"><a name="a28"></a><span class="src-doc"> * POSSIBILITY OF SUCH DAMAGE.</span></div></li>
|
||||
<li><div class="src-line"><a name="a29"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a30"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@copyright</span><span class="src-doc"> Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)</span></div></li>
|
||||
<li><div class="src-line"><a name="a31"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@license</span><span class="src-doc"> http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD</span></div></li>
|
||||
<li><div class="src-line"><a name="a32"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> $Id: Response.php 54 2011-02-04 16:29:18Z donovan.jimenez $</span></div></li>
|
||||
<li><div class="src-line"><a name="a33"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a34"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@package</span><span class="src-doc"> Apache</span></div></li>
|
||||
<li><div class="src-line"><a name="a35"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@subpackage</span><span class="src-doc"> Solr</span></div></li>
|
||||
<li><div class="src-line"><a name="a36"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@author</span><span class="src-doc"> Donovan Jimenez <djimenez@conduit-it.com></span></div></li>
|
||||
<li><div class="src-line"><a name="a37"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a38"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a39"></a><span class="src-inc">require_once</span><span class="src-sym">(</span><span class="src-id">dirname</span><span class="src-sym">(</span>__FILE__<span class="src-sym">) </span>. <span class="src-str">'/ParserException.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a40"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a41"></a><span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a42"></a><span class="src-doc"> * Represents a Solr response. Parses the raw response into a set of stdClass objects</span></div></li>
|
||||
<li><div class="src-line"><a name="a43"></a><span class="src-doc"> * and associative arrays for easy access.</span></div></li>
|
||||
<li><div class="src-line"><a name="a44"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a45"></a><span class="src-doc"> * Currently requires json_decode which is bundled with PHP >= 5.2.0, Alternatively can be</span></div></li>
|
||||
<li><div class="src-line"><a name="a46"></a><span class="src-doc"> * installed with PECL. Zend Framework also includes a purely PHP solution.</span></div></li>
|
||||
<li><div class="src-line"><a name="a47"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a48"></a><span class="src-key">class </span><a href="../Apache/Solr/Apache_Solr_Response.html">Apache_Solr_Response</a></div></li>
|
||||
<li><div class="src-line"><a name="a49"></a><span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a50"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a51"></a><span class="src-doc"> * SVN Revision meta data for this class</span></div></li>
|
||||
<li><div class="src-line"><a name="a52"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a53"></a> <span class="src-key">const </span><span class="src-id">SVN_REVISION </span>= <span class="src-str">'$Revision: 54 $'</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a54"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a55"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a56"></a><span class="src-doc"> * SVN ID meta data for this class</span></div></li>
|
||||
<li><div class="src-line"><a name="a57"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a58"></a> <span class="src-key">const </span><span class="src-id">SVN_ID </span>= <span class="src-str">'$Id: Response.php 54 2011-02-04 16:29:18Z donovan.jimenez $'</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a59"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a60"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a61"></a><span class="src-doc"> * Holds the raw response used in construction</span></div></li>
|
||||
<li><div class="src-line"><a name="a62"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a63"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">Apache_Solr_HttpTransport_Response </span><span class="src-doc">HTTP response</span></div></li>
|
||||
<li><div class="src-line"><a name="a64"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a65"></a> <span class="src-key">protected </span><a href="../Apache/Solr/Apache_Solr_Response.html#var$_response">$_response</a><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a66"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a67"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a68"></a><span class="src-doc"> * Whether the raw response has been parsed</span></div></li>
|
||||
<li><div class="src-line"><a name="a69"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a70"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">boolean </span></div></li>
|
||||
<li><div class="src-line"><a name="a71"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a72"></a> <span class="src-key">protected </span><a href="../Apache/Solr/Apache_Solr_Response.html#var$_isParsed">$_isParsed</a> = <span class="src-id">false</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a73"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a74"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a75"></a><span class="src-doc"> * Parsed representation of the data</span></div></li>
|
||||
<li><div class="src-line"><a name="a76"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a77"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">mixed </span></div></li>
|
||||
<li><div class="src-line"><a name="a78"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a79"></a> <span class="src-key">protected </span><a href="../Apache/Solr/Apache_Solr_Response.html#var$_parsedData">$_parsedData</a><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a80"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a81"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a82"></a><span class="src-doc"> * Data parsing flags. Determines what extra processing should be done</span></div></li>
|
||||
<li><div class="src-line"><a name="a83"></a><span class="src-doc"> * after the data is initially converted to a data structure.</span></div></li>
|
||||
<li><div class="src-line"><a name="a84"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a85"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">boolean </span></div></li>
|
||||
<li><div class="src-line"><a name="a86"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a87"></a> <span class="src-key">protected </span><a href="../Apache/Solr/Apache_Solr_Response.html#var$_createDocuments">$_createDocuments</a> = <span class="src-id">true</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"><a name="a88"></a> <a href="../Apache/Solr/Apache_Solr_Response.html#var$_collapseSingleValueArrays">$_collapseSingleValueArrays</a> = <span class="src-id">true</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a89"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a90"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a91"></a><span class="src-doc"> * Constructor. Takes the raw HTTP response body and the exploded HTTP headers</span></div></li>
|
||||
<li><div class="src-line"><a name="a92"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a93"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">Apache_Solr_HttpTransport_Response </span><span class="src-doc">HTTP response</span></div></li>
|
||||
<li><div class="src-line"><a name="a94"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc-var">$createDocuments </span><span class="src-doc">Whether to convert the documents json_decoded as stdClass instances to Apache_Solr_Document instances</span></div></li>
|
||||
<li><div class="src-line"><a name="a95"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc-var">$collapseSingleValueArrays </span><span class="src-doc">Whether to make multivalued fields appear as single values</span></div></li>
|
||||
<li><div class="src-line"><a name="a96"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a97"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Response.html#method__construct">__construct</a><span class="src-sym">(</span><span class="src-id">Apache_Solr_HttpTransport_Response </span><span class="src-var">$response</span><span class="src-sym">, </span><span class="src-var">$createDocuments </span>= <span class="src-id">true</span><span class="src-sym">, </span><span class="src-var">$collapseSingleValueArrays </span>= <span class="src-id">true</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a98"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a99"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Response.html#var$_response">_response</a> = <span class="src-var">$response</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a100"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Response.html#var$_createDocuments">_createDocuments</a> = (bool) <span class="src-var">$createDocuments</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a101"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Response.html#var$_collapseSingleValueArrays">_collapseSingleValueArrays</a> = (bool) <span class="src-var">$collapseSingleValueArrays</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a102"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a103"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a104"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a105"></a><span class="src-doc"> * Get the HTTP status code</span></div></li>
|
||||
<li><div class="src-line"><a name="a106"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a107"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">integer </span></div></li>
|
||||
<li><div class="src-line"><a name="a108"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a109"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Response.html#methodgetHttpStatus">getHttpStatus</a><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a110"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a111"></a> <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Response.html#var$_response">_response</a><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Response.html#methodgetStatusCode">getStatusCode</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a112"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a113"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a114"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a115"></a><span class="src-doc"> * Get the HTTP status message of the response</span></div></li>
|
||||
<li><div class="src-line"><a name="a116"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a117"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></div></li>
|
||||
<li><div class="src-line"><a name="a118"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a119"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Response.html#methodgetHttpStatusMessage">getHttpStatusMessage</a><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a120"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a121"></a> <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Response.html#var$_response">_response</a><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Response.html#methodgetStatusMessage">getStatusMessage</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a122"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a123"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a124"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a125"></a><span class="src-doc"> * Get content type of this Solr response</span></div></li>
|
||||
<li><div class="src-line"><a name="a126"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a127"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></div></li>
|
||||
<li><div class="src-line"><a name="a128"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a129"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Response.html#methodgetType">getType</a><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a130"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a131"></a> <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Response.html#var$_response">_response</a><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Response.html#methodgetMimeType">getMimeType</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a132"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a133"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a134"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a135"></a><span class="src-doc"> * Get character encoding of this response. Should usually be utf-8, but just in case</span></div></li>
|
||||
<li><div class="src-line"><a name="a136"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a137"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></div></li>
|
||||
<li><div class="src-line"><a name="a138"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a139"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Response.html#methodgetEncoding">getEncoding</a><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a140"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a141"></a> <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Response.html#var$_response">_response</a><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Response.html#methodgetEncoding">getEncoding</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a142"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a143"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a144"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a145"></a><span class="src-doc"> * Get the raw response as it was given to this object</span></div></li>
|
||||
<li><div class="src-line"><a name="a146"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a147"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></div></li>
|
||||
<li><div class="src-line"><a name="a148"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a149"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Response.html#methodgetRawResponse">getRawResponse</a><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a150"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a151"></a> <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Response.html#var$_response">_response</a><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Response.html#methodgetBody">getBody</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a152"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a153"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a154"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a155"></a><span class="src-doc"> * Magic get to expose the parsed data and to lazily load it</span></div></li>
|
||||
<li><div class="src-line"><a name="a156"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a157"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$key </span></div></li>
|
||||
<li><div class="src-line"><a name="a158"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">mixed </span></div></li>
|
||||
<li><div class="src-line"><a name="a159"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a160"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Response.html#method__get">__get</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a161"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a162"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Response.html#var$_isParsed">_isParsed</a><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a163"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a164"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Response.html#method_parseData">_parseData</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a165"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Response.html#var$_isParsed">_isParsed</a> = <span class="src-id">true</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a166"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a167"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a168"></a> <span class="src-key">if </span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Response.html#var$_parsedData">_parsedData</a><span class="src-sym">-></span><span class="src-var">$key</span><span class="src-sym">))</span></div></li>
|
||||
<li><div class="src-line"><a name="a169"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a170"></a> <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Response.html#var$_parsedData">_parsedData</a><span class="src-sym">-></span><span class="src-var">$key</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a171"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a172"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a173"></a> <span class="src-key">return </span><span class="src-id">null</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a174"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a175"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a176"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a177"></a><span class="src-doc"> * Magic function for isset function on parsed data</span></div></li>
|
||||
<li><div class="src-line"><a name="a178"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a179"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$key </span></div></li>
|
||||
<li><div class="src-line"><a name="a180"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">boolean </span></div></li>
|
||||
<li><div class="src-line"><a name="a181"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a182"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Response.html#method__isset">__isset</a><span class="src-sym">(</span><span class="src-var">$key</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a183"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a184"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Response.html#var$_isParsed">_isParsed</a><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a185"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a186"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Response.html#method_parseData">_parseData</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a187"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Response.html#var$_isParsed">_isParsed</a> = <span class="src-id">true</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a188"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a189"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a190"></a> <span class="src-key">return </span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Response.html#var$_parsedData">_parsedData</a><span class="src-sym">-></span><span class="src-var">$key</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a191"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a192"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a193"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a194"></a><span class="src-doc"> * Parse the raw response into the parsed_data array for access</span></div></li>
|
||||
<li><div class="src-line"><a name="a195"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a196"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@throws</span><span class="src-doc"> Apache_Solr_ParserException If the data could not be parsed</span></div></li>
|
||||
<li><div class="src-line"><a name="a197"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a198"></a> <span class="src-key">protected </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Response.html#method_parseData">_parseData</a><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a199"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a200"></a> <span class="src-comm">//An alternative would be to use Zend_Json::decode(...)</span></div></li>
|
||||
<li><div class="src-line"><a name="a201"></a> <span class="src-var">$data </span>= <a href="http://www.php.net/json_decode">json_decode</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Response.html#var$_response">_response</a><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_HttpTransport_Response.html#methodgetBody">getBody</a><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a202"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a203"></a> <span class="src-comm">// check that we receive a valid JSON response - we should never receive a null</span></div></li>
|
||||
<li><div class="src-line"><a name="a204"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$data </span>=== <span class="src-id">null</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a205"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a206"></a> throw <span class="src-key">new </span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_ParserException.html">Apache_Solr_ParserException</a></span><span class="src-sym">(</span><span class="src-str">'Solr response does not appear to be valid JSON, please examine the raw response with getRawResponse() method'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a207"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a208"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a209"></a> <span class="src-comm">//if we're configured to collapse single valued arrays or to convert them to Apache_Solr_Document objects</span></div></li>
|
||||
<li><div class="src-line"><a name="a210"></a> <span class="src-comm">//and we have response documents, then try to collapse the values and / or convert them now</span></div></li>
|
||||
<li><div class="src-line"><a name="a211"></a> <span class="src-key">if </span><span class="src-sym">((</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Response.html#var$_createDocuments">_createDocuments</a> || <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Response.html#var$_collapseSingleValueArrays">_collapseSingleValueArrays</a><span class="src-sym">) </span>&& isset<span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-></span><span class="src-id">response</span><span class="src-sym">) </span>&& <a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-></span><span class="src-id">response</span><span class="src-sym">-></span><span class="src-id">docs</span><span class="src-sym">))</span></div></li>
|
||||
<li><div class="src-line"><a name="a212"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a213"></a> <span class="src-var">$documents </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a214"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a215"></a> <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">-></span><span class="src-id">response</span><span class="src-sym">-></span><span class="src-id">docs </span><span class="src-key">as </span><span class="src-var">$originalDocument</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a216"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a217"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Response.html#var$_createDocuments">_createDocuments</a><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a218"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a219"></a> <span class="src-var">$document </span>= <span class="src-key">new </span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_Document.html">Apache_Solr_Document</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a220"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a221"></a> <span class="src-key">else</span></div></li>
|
||||
<li><div class="src-line"><a name="a222"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a223"></a> <span class="src-var">$document </span>= <span class="src-var">$originalDocument</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a224"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a225"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a226"></a> <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$originalDocument </span><span class="src-key">as </span><span class="src-var">$key </span>=> <span class="src-var">$value</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a227"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a228"></a> <span class="src-comm">//If a result is an array with only a single</span></div></li>
|
||||
<li><div class="src-line"><a name="a229"></a> <span class="src-comm">//value then its nice to be able to access</span></div></li>
|
||||
<li><div class="src-line"><a name="a230"></a> <span class="src-comm">//it as if it were always a single value</span></div></li>
|
||||
<li><div class="src-line"><a name="a231"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Response.html#var$_collapseSingleValueArrays">_collapseSingleValueArrays</a> && <a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">) </span>&& <a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">) </span><= <span class="src-num">1</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a232"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a233"></a> <span class="src-var">$value </span>= <a href="http://www.php.net/array_shift">array_shift</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a234"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a235"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a236"></a> <span class="src-var">$document</span><span class="src-sym">-></span><span class="src-var">$key </span>= <span class="src-var">$value</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a237"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a238"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a239"></a> <span class="src-var">$documents</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-var">$document</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a240"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a241"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a242"></a> <span class="src-var">$data</span><span class="src-sym">-></span><span class="src-id">response</span><span class="src-sym">-></span><span class="src-id">docs </span>= <span class="src-var">$documents</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a243"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a244"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a245"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Response.html#var$_parsedData">_parsedData</a> = <span class="src-var">$data</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a246"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a247"></a><span class="src-sym">}</span></div></li>
|
||||
</ol></div>
|
||||
</div>
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:15 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,934 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>File Source for Balancer.php</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Source for file Balancer.php</h1>
|
||||
<p>Documentation is available at <a href="../Apache/Solr/_Service---Balancer.php.html">Balancer.php</a></p>
|
||||
<div class="src-code">
|
||||
<div class="src-code"><ol><li><div class="src-line"><a name="a1"></a><span class="src-php"><?php</span></div></li>
|
||||
<li><div class="src-line"><a name="a2"></a><span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a3"></a><span class="src-doc"> * Copyright (c) 2007-2011, Servigistics, Inc.</span></div></li>
|
||||
<li><div class="src-line"><a name="a4"></a><span class="src-doc"> * All rights reserved.</span></div></li>
|
||||
<li><div class="src-line"><a name="a5"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a6"></a><span class="src-doc"> * Redistribution and use in source and binary forms, with or without</span></div></li>
|
||||
<li><div class="src-line"><a name="a7"></a><span class="src-doc"> * modification, are permitted provided that the following conditions are met:</span></div></li>
|
||||
<li><div class="src-line"><a name="a8"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a9"></a><span class="src-doc"> * - Redistributions of source code must retain the above copyright notice,</span></div></li>
|
||||
<li><div class="src-line"><a name="a10"></a><span class="src-doc"> * this list of conditions and the following disclaimer.</span></div></li>
|
||||
<li><div class="src-line"><a name="a11"></a><span class="src-doc"> * - Redistributions in binary form must reproduce the above copyright</span></div></li>
|
||||
<li><div class="src-line"><a name="a12"></a><span class="src-doc"> * notice, this list of conditions and the following disclaimer in the</span></div></li>
|
||||
<li><div class="src-line"><a name="a13"></a><span class="src-doc"> * documentation and/or other materials provided with the distribution.</span></div></li>
|
||||
<li><div class="src-line"><a name="a14"></a><span class="src-doc"> * - Neither the name of Servigistics, Inc. nor the names of</span></div></li>
|
||||
<li><div class="src-line"><a name="a15"></a><span class="src-doc"> * its contributors may be used to endorse or promote products derived from</span></div></li>
|
||||
<li><div class="src-line"><a name="a16"></a><span class="src-doc"> * this software without specific prior written permission.</span></div></li>
|
||||
<li><div class="src-line"><a name="a17"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a18"></a><span class="src-doc"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"</span></div></li>
|
||||
<li><div class="src-line"><a name="a19"></a><span class="src-doc"> * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div></li>
|
||||
<li><div class="src-line"><a name="a20"></a><span class="src-doc"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div></li>
|
||||
<li><div class="src-line"><a name="a21"></a><span class="src-doc"> * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE</span></div></li>
|
||||
<li><div class="src-line"><a name="a22"></a><span class="src-doc"> * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div></li>
|
||||
<li><div class="src-line"><a name="a23"></a><span class="src-doc"> * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div></li>
|
||||
<li><div class="src-line"><a name="a24"></a><span class="src-doc"> * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div></li>
|
||||
<li><div class="src-line"><a name="a25"></a><span class="src-doc"> * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div></li>
|
||||
<li><div class="src-line"><a name="a26"></a><span class="src-doc"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div></li>
|
||||
<li><div class="src-line"><a name="a27"></a><span class="src-doc"> * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div></li>
|
||||
<li><div class="src-line"><a name="a28"></a><span class="src-doc"> * POSSIBILITY OF SUCH DAMAGE.</span></div></li>
|
||||
<li><div class="src-line"><a name="a29"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a30"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@copyright</span><span class="src-doc"> Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)</span></div></li>
|
||||
<li><div class="src-line"><a name="a31"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@license</span><span class="src-doc"> http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD</span></div></li>
|
||||
<li><div class="src-line"><a name="a32"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> $Id: Balancer.php 54 2011-02-04 16:29:18Z donovan.jimenez $</span></div></li>
|
||||
<li><div class="src-line"><a name="a33"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a34"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@package</span><span class="src-doc"> Apache</span></div></li>
|
||||
<li><div class="src-line"><a name="a35"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@subpackage</span><span class="src-doc"> Solr</span></div></li>
|
||||
<li><div class="src-line"><a name="a36"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@author</span><span class="src-doc"> Donovan Jimenez <djimenez@conduit-it.com>, Dan Wolfe</span></div></li>
|
||||
<li><div class="src-line"><a name="a37"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a38"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a39"></a><span class="src-comm">// See Issue #1 (http://code.google.com/p/solr-php-client/issues/detail?id=1)</span></div></li>
|
||||
<li><div class="src-line"><a name="a40"></a><span class="src-comm">// Doesn't follow typical include path conventions, but is more convenient for users</span></div></li>
|
||||
<li><div class="src-line"><a name="a41"></a><span class="src-inc">require_once</span><span class="src-sym">(</span><span class="src-id">dirname</span><span class="src-sym">(</span><span class="src-id">dirname</span><span class="src-sym">(</span>__FILE__<span class="src-sym">)) </span>. <span class="src-str">'/Service.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a42"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a43"></a><span class="src-inc">require_once</span><span class="src-sym">(</span><span class="src-id">dirname</span><span class="src-sym">(</span><span class="src-id">dirname</span><span class="src-sym">(</span>__FILE__<span class="src-sym">)) </span>. <span class="src-str">'/NoServiceAvailableException.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a44"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a45"></a><span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a46"></a><span class="src-doc"> * Reference Implementation for using multiple Solr services in a distribution. Functionality</span></div></li>
|
||||
<li><div class="src-line"><a name="a47"></a><span class="src-doc"> * includes:</span></div></li>
|
||||
<li><div class="src-line"><a name="a48"></a><span class="src-doc"> * routing of read / write operations</span></div></li>
|
||||
<li><div class="src-line"><a name="a49"></a><span class="src-doc"> * failover (on selection) for multiple read servers</span></div></li>
|
||||
<li><div class="src-line"><a name="a50"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a51"></a><span class="src-key">class </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html">Apache_Solr_Service_Balancer</a></div></li>
|
||||
<li><div class="src-line"><a name="a52"></a><span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a53"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a54"></a><span class="src-doc"> * SVN Revision meta data for this class</span></div></li>
|
||||
<li><div class="src-line"><a name="a55"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a56"></a> <span class="src-key">const </span><span class="src-id">SVN_REVISION </span>= <span class="src-str">'$Revision: 54 $'</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a57"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a58"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a59"></a><span class="src-doc"> * SVN ID meta data for this class</span></div></li>
|
||||
<li><div class="src-line"><a name="a60"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a61"></a> <span class="src-key">const </span><span class="src-id">SVN_ID </span>= <span class="src-str">'$Id: Balancer.php 54 2011-02-04 16:29:18Z donovan.jimenez $'</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a62"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a63"></a> <span class="src-key">protected </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_createDocuments">$_createDocuments</a> = <span class="src-id">true</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a64"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a65"></a> <span class="src-key">protected </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_readableServices">$_readableServices</a> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a66"></a> <span class="src-key">protected </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_writeableServices">$_writeableServices</a> = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a67"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a68"></a> <span class="src-key">protected </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_currentReadService">$_currentReadService</a> = <span class="src-id">null</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a69"></a> <span class="src-key">protected </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_currentWriteService">$_currentWriteService</a> = <span class="src-id">null</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a70"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a71"></a> <span class="src-key">protected </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_readPingTimeout">$_readPingTimeout</a> = <span class="src-num">2</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a72"></a> <span class="src-key">protected </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_writePingTimeout">$_writePingTimeout</a> = <span class="src-num">4</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a73"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a74"></a> <span class="src-comm">// Configuration for server selection backoff intervals</span></div></li>
|
||||
<li><div class="src-line"><a name="a75"></a> <span class="src-key">protected </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_useBackoff">$_useBackoff</a> = <span class="src-id">false</span><span class="src-sym">; </span><span class="src-comm">// Set to true to use more resillient write server selection</span></div></li>
|
||||
<li><div class="src-line"><a name="a76"></a> <span class="src-key">protected </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_backoffLimit">$_backoffLimit</a> = <span class="src-num">600</span><span class="src-sym">; </span><span class="src-comm">// 10 minute default maximum</span></div></li>
|
||||
<li><div class="src-line"><a name="a77"></a> <span class="src-key">protected </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_backoffEscalation">$_backoffEscalation</a> = <span class="src-num">2.0</span><span class="src-sym">; </span><span class="src-comm">// Rate at which to increase backoff period</span></div></li>
|
||||
<li><div class="src-line"><a name="a78"></a> <span class="src-key">protected </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_defaultBackoff">$_defaultBackoff</a> = <span class="src-num">2.0</span><span class="src-sym">; </span><span class="src-comm">// Default backoff interval</span></div></li>
|
||||
<li><div class="src-line"><a name="a79"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a80"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a81"></a><span class="src-doc"> * Escape a value for special query characters such as ':', '(', ')', '*', '?', etc.</span></div></li>
|
||||
<li><div class="src-line"><a name="a82"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a83"></a><span class="src-doc"> * NOTE: inside a phrase fewer characters need escaped, use </span><span class="src-doc-inlinetag">{@link Apache_Solr_Service::escapePhrase()}</span><span class="src-doc"> instead</span></div></li>
|
||||
<li><div class="src-line"><a name="a84"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a85"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$value </span></div></li>
|
||||
<li><div class="src-line"><a name="a86"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></div></li>
|
||||
<li><div class="src-line"><a name="a87"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a88"></a> <span class="src-key">static </span><span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#methodescape">escape</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a89"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a90"></a> <span class="src-key">return </span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_Service.html">Apache_Solr_Service</a></span><span class="src-sym">::</span><a href="../Apache/Solr/Apache_Solr_Service.html#methodescape">escape</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a91"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a92"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a93"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a94"></a><span class="src-doc"> * Escape a value meant to be contained in a phrase for special query characters</span></div></li>
|
||||
<li><div class="src-line"><a name="a95"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a96"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$value </span></div></li>
|
||||
<li><div class="src-line"><a name="a97"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></div></li>
|
||||
<li><div class="src-line"><a name="a98"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a99"></a> <span class="src-key">static </span><span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#methodescapePhrase">escapePhrase</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a100"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a101"></a> <span class="src-key">return </span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_Service.html">Apache_Solr_Service</a></span><span class="src-sym">::</span><a href="../Apache/Solr/Apache_Solr_Service.html#methodescapePhrase">escapePhrase</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a102"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a103"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a104"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a105"></a><span class="src-doc"> * Convenience function for creating phrase syntax from a value</span></div></li>
|
||||
<li><div class="src-line"><a name="a106"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a107"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$value </span></div></li>
|
||||
<li><div class="src-line"><a name="a108"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></div></li>
|
||||
<li><div class="src-line"><a name="a109"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a110"></a> <span class="src-key">static </span><span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#methodphrase">phrase</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a111"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a112"></a> <span class="src-key">return </span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_Service.html">Apache_Solr_Service</a></span><span class="src-sym">::</span><a href="../Apache/Solr/Apache_Solr_Service.html#methodphrase">phrase</a><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a113"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a114"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a115"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a116"></a><span class="src-doc"> * Constructor. Takes arrays of read and write service instances or descriptions</span></div></li>
|
||||
<li><div class="src-line"><a name="a117"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a118"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">array </span><span class="src-doc-var">$readableServices </span></div></li>
|
||||
<li><div class="src-line"><a name="a119"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">array </span><span class="src-doc-var">$writeableServices </span></div></li>
|
||||
<li><div class="src-line"><a name="a120"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a121"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method__construct">__construct</a><span class="src-sym">(</span><span class="src-var">$readableServices </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$writeableServices </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">))</span></div></li>
|
||||
<li><div class="src-line"><a name="a122"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a123"></a> <span class="src-comm">//setup readable services</span></div></li>
|
||||
<li><div class="src-line"><a name="a124"></a> <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$readableServices </span><span class="src-key">as </span><span class="src-var">$service</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a125"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a126"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#methodaddReadService">addReadService</a><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a127"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a128"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a129"></a> <span class="src-comm">//setup writeable services</span></div></li>
|
||||
<li><div class="src-line"><a name="a130"></a> <span class="src-key">foreach </span><span class="src-sym">(</span><span class="src-var">$writeableServices </span><span class="src-key">as </span><span class="src-var">$service</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a131"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a132"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#methodaddWriteService">addWriteService</a><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a133"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a134"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a135"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a136"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#methodsetReadPingTimeout">setReadPingTimeout</a><span class="src-sym">(</span><span class="src-var">$timeout</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a137"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a138"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_readPingTimeout">_readPingTimeout</a> = <span class="src-var">$timeout</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a139"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a140"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a141"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#methodsetWritePingTimeout">setWritePingTimeout</a><span class="src-sym">(</span><span class="src-var">$timeout</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a142"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a143"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_writePingTimeout">_writePingTimeout</a> = <span class="src-var">$timeout</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a144"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a145"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a146"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#methodsetUseBackoff">setUseBackoff</a><span class="src-sym">(</span><span class="src-var">$enable</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a147"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a148"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_useBackoff">_useBackoff</a> = <span class="src-var">$enable</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a149"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a150"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a151"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a152"></a><span class="src-doc"> * Generates a service ID</span></div></li>
|
||||
<li><div class="src-line"><a name="a153"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a154"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$host </span></div></li>
|
||||
<li><div class="src-line"><a name="a155"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">integer </span><span class="src-doc-var">$port </span></div></li>
|
||||
<li><div class="src-line"><a name="a156"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$path </span></div></li>
|
||||
<li><div class="src-line"><a name="a157"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></div></li>
|
||||
<li><div class="src-line"><a name="a158"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a159"></a> <span class="src-key">protected </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_getServiceId">_getServiceId</a><span class="src-sym">(</span><span class="src-var">$host</span><span class="src-sym">, </span><span class="src-var">$port</span><span class="src-sym">, </span><span class="src-var">$path</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a160"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a161"></a> <span class="src-key">return </span><span class="src-var">$host </span>. <span class="src-str">':' </span>. <span class="src-var">$port </span>. <span class="src-var">$path</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a162"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a163"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a164"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a165"></a><span class="src-doc"> * Adds a service instance or service descriptor (if it is already</span></div></li>
|
||||
<li><div class="src-line"><a name="a166"></a><span class="src-doc"> * not added)</span></div></li>
|
||||
<li><div class="src-line"><a name="a167"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a168"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">mixed </span><span class="src-doc-var">$service </span></div></li>
|
||||
<li><div class="src-line"><a name="a169"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a170"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@throws</span><span class="src-doc"> Apache_Solr_InvalidArgumentException If service descriptor is not valid</span></div></li>
|
||||
<li><div class="src-line"><a name="a171"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a172"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#methodaddReadService">addReadService</a><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a173"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a174"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$service </span>instanceof <span class="src-id"><a href="../Apache/Solr/Apache_Solr_Service.html">Apache_Solr_Service</a></span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a175"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a176"></a> <span class="src-var">$id </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_getServiceId">_getServiceId</a><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">-></span><span class="src-id">getHost</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$service</span><span class="src-sym">-></span><span class="src-id">getPort</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$service</span><span class="src-sym">-></span><span class="src-id">getPath</span><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a177"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a178"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_readableServices">_readableServices</a><span class="src-sym">[</span><span class="src-var">$id</span><span class="src-sym">] </span>= <span class="src-var">$service</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a179"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a180"></a> <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">))</span></div></li>
|
||||
<li><div class="src-line"><a name="a181"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a182"></a> <span class="src-key">if </span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'host'</span><span class="src-sym">]</span><span class="src-sym">) </span>&& isset<span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'port'</span><span class="src-sym">]</span><span class="src-sym">) </span>&& isset<span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'path'</span><span class="src-sym">]</span><span class="src-sym">))</span></div></li>
|
||||
<li><div class="src-line"><a name="a183"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a184"></a> <span class="src-var">$id </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_getServiceId">_getServiceId</a><span class="src-sym">(</span>(string)<span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'host'</span><span class="src-sym">]</span><span class="src-sym">, </span>(int)<span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'port'</span><span class="src-sym">]</span><span class="src-sym">, </span>(string)<span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'path'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a185"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a186"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_readableServices">_readableServices</a><span class="src-sym">[</span><span class="src-var">$id</span><span class="src-sym">] </span>= <span class="src-var">$service</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a187"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a188"></a> <span class="src-key">else</span></div></li>
|
||||
<li><div class="src-line"><a name="a189"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a190"></a> throw <span class="src-key">new </span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_InvalidArgumentException.html">Apache_Solr_InvalidArgumentException</a></span><span class="src-sym">(</span><span class="src-str">'A Readable Service description array does not have all required elements of host, port, and path'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a191"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a192"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a193"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a194"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a195"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a196"></a><span class="src-doc"> * Removes a service instance or descriptor from the available services</span></div></li>
|
||||
<li><div class="src-line"><a name="a197"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a198"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">mixed </span><span class="src-doc-var">$service </span></div></li>
|
||||
<li><div class="src-line"><a name="a199"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a200"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@throws</span><span class="src-doc"> Apache_Solr_InvalidArgumentException If service descriptor is not valid</span></div></li>
|
||||
<li><div class="src-line"><a name="a201"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a202"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#methodremoveReadService">removeReadService</a><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a203"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a204"></a> <span class="src-var">$id </span>= <span class="src-str">''</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a205"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a206"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$service </span>instanceof <span class="src-id"><a href="../Apache/Solr/Apache_Solr_Service.html">Apache_Solr_Service</a></span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a207"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a208"></a> <span class="src-var">$id </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_getServiceId">_getServiceId</a><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">-></span><span class="src-id">getHost</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$service</span><span class="src-sym">-></span><span class="src-id">getPort</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$service</span><span class="src-sym">-></span><span class="src-id">getPath</span><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a209"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a210"></a> <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">))</span></div></li>
|
||||
<li><div class="src-line"><a name="a211"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a212"></a> <span class="src-key">if </span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'host'</span><span class="src-sym">]</span><span class="src-sym">) </span>&& isset<span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'port'</span><span class="src-sym">]</span><span class="src-sym">) </span>&& isset<span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'path'</span><span class="src-sym">]</span><span class="src-sym">))</span></div></li>
|
||||
<li><div class="src-line"><a name="a213"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a214"></a> <span class="src-var">$id </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_getServiceId">_getServiceId</a><span class="src-sym">(</span>(string)<span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'host'</span><span class="src-sym">]</span><span class="src-sym">, </span>(int)<span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'port'</span><span class="src-sym">]</span><span class="src-sym">, </span>(string)<span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'path'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a215"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a216"></a> <span class="src-key">else</span></div></li>
|
||||
<li><div class="src-line"><a name="a217"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a218"></a> throw <span class="src-key">new </span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_InvalidArgumentException.html">Apache_Solr_InvalidArgumentException</a></span><span class="src-sym">(</span><span class="src-str">'A Readable Service description array does not have all required elements of host, port, and path'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a219"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a220"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a221"></a> <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/is_string">is_string</a><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">))</span></div></li>
|
||||
<li><div class="src-line"><a name="a222"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a223"></a> <span class="src-var">$id </span>= <span class="src-var">$service</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a224"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a225"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a226"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$id </span>&& isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_readableServices">_readableServices</a><span class="src-sym">[</span><span class="src-var">$id</span><span class="src-sym">]</span><span class="src-sym">))</span></div></li>
|
||||
<li><div class="src-line"><a name="a227"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a228"></a> unset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_readableServices">_readableServices</a><span class="src-sym">[</span><span class="src-var">$id</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a229"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a230"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a231"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a232"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a233"></a><span class="src-doc"> * Adds a service instance or service descriptor (if it is already</span></div></li>
|
||||
<li><div class="src-line"><a name="a234"></a><span class="src-doc"> * not added)</span></div></li>
|
||||
<li><div class="src-line"><a name="a235"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a236"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">mixed </span><span class="src-doc-var">$service </span></div></li>
|
||||
<li><div class="src-line"><a name="a237"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a238"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@throws</span><span class="src-doc"> Apache_Solr_InvalidArgumentException If service descriptor is not valid</span></div></li>
|
||||
<li><div class="src-line"><a name="a239"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a240"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#methodaddWriteService">addWriteService</a><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a241"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a242"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$service </span>instanceof <span class="src-id"><a href="../Apache/Solr/Apache_Solr_Service.html">Apache_Solr_Service</a></span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a243"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a244"></a> <span class="src-var">$id </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_getServiceId">_getServiceId</a><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">-></span><span class="src-id">getHost</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$service</span><span class="src-sym">-></span><span class="src-id">getPort</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$service</span><span class="src-sym">-></span><span class="src-id">getPath</span><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a245"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a246"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_writeableServices">_writeableServices</a><span class="src-sym">[</span><span class="src-var">$id</span><span class="src-sym">] </span>= <span class="src-var">$service</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a247"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a248"></a> <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">))</span></div></li>
|
||||
<li><div class="src-line"><a name="a249"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a250"></a> <span class="src-key">if </span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'host'</span><span class="src-sym">]</span><span class="src-sym">) </span>&& isset<span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'port'</span><span class="src-sym">]</span><span class="src-sym">) </span>&& isset<span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'path'</span><span class="src-sym">]</span><span class="src-sym">))</span></div></li>
|
||||
<li><div class="src-line"><a name="a251"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a252"></a> <span class="src-var">$id </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_getServiceId">_getServiceId</a><span class="src-sym">(</span>(string)<span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'host'</span><span class="src-sym">]</span><span class="src-sym">, </span>(int)<span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'port'</span><span class="src-sym">]</span><span class="src-sym">, </span>(string)<span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'path'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a253"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a254"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_writeableServices">_writeableServices</a><span class="src-sym">[</span><span class="src-var">$id</span><span class="src-sym">] </span>= <span class="src-var">$service</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a255"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a256"></a> <span class="src-key">else</span></div></li>
|
||||
<li><div class="src-line"><a name="a257"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a258"></a> throw <span class="src-key">new </span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_InvalidArgumentException.html">Apache_Solr_InvalidArgumentException</a></span><span class="src-sym">(</span><span class="src-str">'A Writeable Service description array does not have all required elements of host, port, and path'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a259"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a260"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a261"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a262"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a263"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a264"></a><span class="src-doc"> * Removes a service instance or descriptor from the available services</span></div></li>
|
||||
<li><div class="src-line"><a name="a265"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a266"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">mixed </span><span class="src-doc-var">$service </span></div></li>
|
||||
<li><div class="src-line"><a name="a267"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a268"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@throws</span><span class="src-doc"> Apache_Solr_InvalidArgumentException If service descriptor is not valid</span></div></li>
|
||||
<li><div class="src-line"><a name="a269"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a270"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#methodremoveWriteService">removeWriteService</a><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a271"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a272"></a> <span class="src-var">$id </span>= <span class="src-str">''</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a273"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a274"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$service </span>instanceof <span class="src-id"><a href="../Apache/Solr/Apache_Solr_Service.html">Apache_Solr_Service</a></span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a275"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a276"></a> <span class="src-var">$id </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_getServiceId">_getServiceId</a><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">-></span><span class="src-id">getHost</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$service</span><span class="src-sym">-></span><span class="src-id">getPort</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$service</span><span class="src-sym">-></span><span class="src-id">getPath</span><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a277"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a278"></a> <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">))</span></div></li>
|
||||
<li><div class="src-line"><a name="a279"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a280"></a> <span class="src-key">if </span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'host'</span><span class="src-sym">]</span><span class="src-sym">) </span>&& isset<span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'port'</span><span class="src-sym">]</span><span class="src-sym">) </span>&& isset<span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'path'</span><span class="src-sym">]</span><span class="src-sym">))</span></div></li>
|
||||
<li><div class="src-line"><a name="a281"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a282"></a> <span class="src-var">$id </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_getServiceId">_getServiceId</a><span class="src-sym">(</span>(string)<span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'host'</span><span class="src-sym">]</span><span class="src-sym">, </span>(int)<span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'port'</span><span class="src-sym">]</span><span class="src-sym">, </span>(string)<span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'path'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a283"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a284"></a> <span class="src-key">else</span></div></li>
|
||||
<li><div class="src-line"><a name="a285"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a286"></a> throw <span class="src-key">new </span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_InvalidArgumentException.html">Apache_Solr_InvalidArgumentException</a></span><span class="src-sym">(</span><span class="src-str">'A Readable Service description array does not have all required elements of host, port, and path'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a287"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a288"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a289"></a> <span class="src-key">else </span><span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/is_string">is_string</a><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">))</span></div></li>
|
||||
<li><div class="src-line"><a name="a290"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a291"></a> <span class="src-var">$id </span>= <span class="src-var">$service</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a292"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a293"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a294"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$id </span>&& isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_writeableServices">_writeableServices</a><span class="src-sym">[</span><span class="src-var">$id</span><span class="src-sym">]</span><span class="src-sym">))</span></div></li>
|
||||
<li><div class="src-line"><a name="a295"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a296"></a> unset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_writeableServices">_writeableServices</a><span class="src-sym">[</span><span class="src-var">$id</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a297"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a298"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a299"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a300"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a301"></a><span class="src-doc"> * Iterate through available read services and select the first with a ping</span></div></li>
|
||||
<li><div class="src-line"><a name="a302"></a><span class="src-doc"> * that satisfies configured timeout restrictions (or the default)</span></div></li>
|
||||
<li><div class="src-line"><a name="a303"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a304"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">Apache_Solr_Service </span></div></li>
|
||||
<li><div class="src-line"><a name="a305"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a306"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@throws</span><span class="src-doc"> Apache_Solr_NoServiceAvailableException If there are no read services that meet requirements</span></div></li>
|
||||
<li><div class="src-line"><a name="a307"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a308"></a> <span class="src-key">protected </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_selectReadService">_selectReadService</a><span class="src-sym">(</span><span class="src-var">$forceSelect </span>= <span class="src-id">false</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a309"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a310"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_currentReadService">_currentReadService</a> || <span class="src-sym">!</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_readableServices">_readableServices</a><span class="src-sym">[</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_currentReadService">_currentReadService</a><span class="src-sym">]</span><span class="src-sym">) </span>|| <span class="src-var">$forceSelect</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a311"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a312"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_currentReadService">_currentReadService</a> && isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_readableServices">_readableServices</a><span class="src-sym">[</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_currentReadService">_currentReadService</a><span class="src-sym">]</span><span class="src-sym">) </span>&& <span class="src-var">$forceSelect</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a313"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a314"></a> <span class="src-comm">// we probably had a communication error, ping the current read service, remove it if it times out</span></div></li>
|
||||
<li><div class="src-line"><a name="a315"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_readableServices">_readableServices</a><span class="src-sym">[</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_currentReadService">_currentReadService</a><span class="src-sym">]</span><span class="src-sym">-></span><span class="src-id">ping</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_readPingTimeout">_readPingTimeout</a><span class="src-sym">) </span>=== <span class="src-id">false</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a316"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a317"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#methodremoveReadService">removeReadService</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_currentReadService">_currentReadService</a><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a318"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a319"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a320"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a321"></a> <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_readableServices">_readableServices</a><span class="src-sym">))</span></div></li>
|
||||
<li><div class="src-line"><a name="a322"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a323"></a> <span class="src-comm">// select one of the read services at random</span></div></li>
|
||||
<li><div class="src-line"><a name="a324"></a> <span class="src-var">$ids </span>= <a href="http://www.php.net/array_keys">array_keys</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_readableServices">_readableServices</a><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a325"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a326"></a> <span class="src-var">$id </span>= <span class="src-var">$ids</span><span class="src-sym">[</span><a href="http://www.php.net/rand">rand</a><span class="src-sym">(</span><span class="src-num">0</span><span class="src-sym">, </span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$ids</span><span class="src-sym">) </span>- <span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a327"></a> <span class="src-var">$service </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_readableServices">_readableServices</a><span class="src-sym">[</span><span class="src-var">$id</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a328"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a329"></a> <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">))</span></div></li>
|
||||
<li><div class="src-line"><a name="a330"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a331"></a> <span class="src-comm">//convert the array definition to a client object</span></div></li>
|
||||
<li><div class="src-line"><a name="a332"></a> <span class="src-var">$service </span>= <span class="src-key">new </span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_Service.html">Apache_Solr_Service</a></span><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'host'</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'port'</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'path'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a333"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_readableServices">_readableServices</a><span class="src-sym">[</span><span class="src-var">$id</span><span class="src-sym">] </span>= <span class="src-var">$service</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a334"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a335"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a336"></a> <span class="src-var">$service</span><span class="src-sym">-></span><span class="src-id">setCreateDocuments</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_createDocuments">_createDocuments</a><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a337"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_currentReadService">_currentReadService</a> = <span class="src-var">$id</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a338"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a339"></a> <span class="src-key">else</span></div></li>
|
||||
<li><div class="src-line"><a name="a340"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a341"></a> throw <span class="src-key">new </span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_NoServiceAvailableException.html">Apache_Solr_NoServiceAvailableException</a></span><span class="src-sym">(</span><span class="src-str">'No read services were available'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a342"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a343"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a344"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a345"></a> <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_readableServices">_readableServices</a><span class="src-sym">[</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_currentReadService">_currentReadService</a><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a346"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a347"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a348"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a349"></a><span class="src-doc"> * Iterate through available write services and select the first with a ping</span></div></li>
|
||||
<li><div class="src-line"><a name="a350"></a><span class="src-doc"> * that satisfies configured timeout restrictions (or the default)</span></div></li>
|
||||
<li><div class="src-line"><a name="a351"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a352"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">Apache_Solr_Service </span></div></li>
|
||||
<li><div class="src-line"><a name="a353"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a354"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@throws</span><span class="src-doc"> Apache_Solr_NoServiceAvailableException If there are no write services that meet requirements</span></div></li>
|
||||
<li><div class="src-line"><a name="a355"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a356"></a> <span class="src-key">protected </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_selectWriteService">_selectWriteService</a><span class="src-sym">(</span><span class="src-var">$forceSelect </span>= <span class="src-id">false</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a357"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a358"></a> <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_useBackoff">_useBackoff</a><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a359"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a360"></a> <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_selectWriteServiceSafe">_selectWriteServiceSafe</a><span class="src-sym">(</span><span class="src-var">$forceSelect</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a361"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a362"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a363"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_currentWriteService">_currentWriteService</a> || <span class="src-sym">!</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_writeableServices">_writeableServices</a><span class="src-sym">[</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_currentWriteService">_currentWriteService</a><span class="src-sym">]</span><span class="src-sym">) </span>|| <span class="src-var">$forceSelect</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a364"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a365"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_currentWriteService">_currentWriteService</a> && isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_writeableServices">_writeableServices</a><span class="src-sym">[</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_currentWriteService">_currentWriteService</a><span class="src-sym">]</span><span class="src-sym">) </span>&& <span class="src-var">$forceSelect</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a366"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a367"></a> <span class="src-comm">// we probably had a communication error, ping the current read service, remove it if it times out</span></div></li>
|
||||
<li><div class="src-line"><a name="a368"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_writeableServices">_writeableServices</a><span class="src-sym">[</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_currentWriteService">_currentWriteService</a><span class="src-sym">]</span><span class="src-sym">-></span><span class="src-id">ping</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_writePingTimeout">_writePingTimeout</a><span class="src-sym">) </span>=== <span class="src-id">false</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a369"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a370"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#methodremoveWriteService">removeWriteService</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_currentWriteService">_currentWriteService</a><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a371"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a372"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a373"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a374"></a> <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_writeableServices">_writeableServices</a><span class="src-sym">))</span></div></li>
|
||||
<li><div class="src-line"><a name="a375"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a376"></a> <span class="src-comm">// select one of the read services at random</span></div></li>
|
||||
<li><div class="src-line"><a name="a377"></a> <span class="src-var">$ids </span>= <a href="http://www.php.net/array_keys">array_keys</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_writeableServices">_writeableServices</a><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a378"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a379"></a> <span class="src-var">$id </span>= <span class="src-var">$ids</span><span class="src-sym">[</span><a href="http://www.php.net/rand">rand</a><span class="src-sym">(</span><span class="src-num">0</span><span class="src-sym">, </span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$ids</span><span class="src-sym">) </span>- <span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a380"></a> <span class="src-var">$service </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_writeableServices">_writeableServices</a><span class="src-sym">[</span><span class="src-var">$id</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a381"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a382"></a> <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">))</span></div></li>
|
||||
<li><div class="src-line"><a name="a383"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a384"></a> <span class="src-comm">//convert the array definition to a client object</span></div></li>
|
||||
<li><div class="src-line"><a name="a385"></a> <span class="src-var">$service </span>= <span class="src-key">new </span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_Service.html">Apache_Solr_Service</a></span><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'host'</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'port'</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'path'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a386"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_writeableServices">_writeableServices</a><span class="src-sym">[</span><span class="src-var">$id</span><span class="src-sym">] </span>= <span class="src-var">$service</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a387"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a388"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a389"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_currentWriteService">_currentWriteService</a> = <span class="src-var">$id</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a390"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a391"></a> <span class="src-key">else</span></div></li>
|
||||
<li><div class="src-line"><a name="a392"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a393"></a> throw <span class="src-key">new </span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_NoServiceAvailableException.html">Apache_Solr_NoServiceAvailableException</a></span><span class="src-sym">(</span><span class="src-str">'No write services were available'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a394"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a395"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a396"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a397"></a> <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_writeableServices">_writeableServices</a><span class="src-sym">[</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_currentWriteService">_currentWriteService</a><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a398"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a399"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a400"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a401"></a><span class="src-doc"> * Iterate through available write services and select the first with a ping</span></div></li>
|
||||
<li><div class="src-line"><a name="a402"></a><span class="src-doc"> * that satisfies configured timeout restrictions (or the default). The</span></div></li>
|
||||
<li><div class="src-line"><a name="a403"></a><span class="src-doc"> * timeout period will increase until a connection is made or the limit is</span></div></li>
|
||||
<li><div class="src-line"><a name="a404"></a><span class="src-doc"> * reached. This will allow for increased reliability with heavily loaded</span></div></li>
|
||||
<li><div class="src-line"><a name="a405"></a><span class="src-doc"> * server(s).</span></div></li>
|
||||
<li><div class="src-line"><a name="a406"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a407"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">Apache_Solr_Service </span></div></li>
|
||||
<li><div class="src-line"><a name="a408"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a409"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@throws</span><span class="src-doc"> Apache_Solr_NoServiceAvailableException If there are no write services that meet requirements</span></div></li>
|
||||
<li><div class="src-line"><a name="a410"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a411"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a412"></a> <span class="src-key">protected </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_selectWriteServiceSafe">_selectWriteServiceSafe</a><span class="src-sym">(</span><span class="src-var">$forceSelect </span>= <span class="src-id">false</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a413"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a414"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_currentWriteService">_currentWriteService</a> || <span class="src-sym">!</span>isset<span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_writeableServices">_writeableServices</a><span class="src-sym">[</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_currentWriteService">_currentWriteService</a><span class="src-sym">]</span><span class="src-sym">) </span>|| <span class="src-var">$forceSelect</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a415"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a416"></a> <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_writeableServices">_writeableServices</a><span class="src-sym">))</span></div></li>
|
||||
<li><div class="src-line"><a name="a417"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a418"></a> <span class="src-var">$backoff </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_defaultBackoff">_defaultBackoff</a><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a419"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a420"></a> do <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a421"></a> <span class="src-comm">// select one of the read services at random</span></div></li>
|
||||
<li><div class="src-line"><a name="a422"></a> <span class="src-var">$ids </span>= <a href="http://www.php.net/array_keys">array_keys</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_writeableServices">_writeableServices</a><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a423"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a424"></a> <span class="src-var">$id </span>= <span class="src-var">$ids</span><span class="src-sym">[</span><a href="http://www.php.net/rand">rand</a><span class="src-sym">(</span><span class="src-num">0</span><span class="src-sym">, </span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$ids</span><span class="src-sym">) </span>- <span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a425"></a> <span class="src-var">$service </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_writeableServices">_writeableServices</a><span class="src-sym">[</span><span class="src-var">$id</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a426"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a427"></a> <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">))</span></div></li>
|
||||
<li><div class="src-line"><a name="a428"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a429"></a> <span class="src-comm">//convert the array definition to a client object</span></div></li>
|
||||
<li><div class="src-line"><a name="a430"></a> <span class="src-var">$service </span>= <span class="src-key">new </span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_Service.html">Apache_Solr_Service</a></span><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'host'</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'port'</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-var">$service</span><span class="src-sym">[</span><span class="src-str">'path'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a431"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_writeableServices">_writeableServices</a><span class="src-sym">[</span><span class="src-var">$id</span><span class="src-sym">] </span>= <span class="src-var">$service</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a432"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a433"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a434"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_currentWriteService">_currentWriteService</a> = <span class="src-var">$id</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a435"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a436"></a> <span class="src-var">$backoff </span>*= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_backoffEscalation">_backoffEscalation</a><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a437"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a438"></a> <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$backoff </span>> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_backoffLimit">_backoffLimit</a><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a439"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a440"></a> throw <span class="src-key">new </span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_NoServiceAvailableException.html">Apache_Solr_NoServiceAvailableException</a></span><span class="src-sym">(</span><span class="src-str">'No write services were available. All timeouts exceeded.'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a441"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a442"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a443"></a> <span class="src-sym">} </span><span class="src-key">while</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_writeableServices">_writeableServices</a><span class="src-sym">[</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_currentWriteService">_currentWriteService</a><span class="src-sym">]</span><span class="src-sym">-></span><span class="src-id">ping</span><span class="src-sym">(</span><span class="src-var">$backoff</span><span class="src-sym">) </span>=== <span class="src-id">false</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a444"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a445"></a> <span class="src-key">else</span></div></li>
|
||||
<li><div class="src-line"><a name="a446"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a447"></a> throw <span class="src-key">new </span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_NoServiceAvailableException.html">Apache_Solr_NoServiceAvailableException</a></span><span class="src-sym">(</span><span class="src-str">'No write services were available'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a448"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a449"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a450"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a451"></a> <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_writeableServices">_writeableServices</a><span class="src-sym">[</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_currentWriteService">_currentWriteService</a><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a452"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a453"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a454"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a455"></a><span class="src-doc"> * Set the create documents flag. This determines whether </span><span class="src-doc-inlinetag">{@link Apache_Solr_Response}</span><span class="src-doc"> objects will</span></div></li>
|
||||
<li><div class="src-line"><a name="a456"></a><span class="src-doc"> * parse the response and create </span><span class="src-doc-inlinetag">{@link Apache_Solr_Document}</span><span class="src-doc"> instances in place.</span></div></li>
|
||||
<li><div class="src-line"><a name="a457"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a458"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc-var">$createDocuments </span></div></li>
|
||||
<li><div class="src-line"><a name="a459"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a460"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#methodsetCreateDocuments">setCreateDocuments</a><span class="src-sym">(</span><span class="src-var">$createDocuments</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a461"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a462"></a> <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_createDocuments">_createDocuments</a> = (bool) <span class="src-var">$createDocuments</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a463"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a464"></a> <span class="src-comm">// set on current read service</span></div></li>
|
||||
<li><div class="src-line"><a name="a465"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_currentReadService">_currentReadService</a><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a466"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a467"></a> <span class="src-var">$service </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_selectReadService">_selectReadService</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a468"></a> <span class="src-var">$service</span><span class="src-sym">-></span><span class="src-id">setCreateDocuments</span><span class="src-sym">(</span><span class="src-var">$createDocuments</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a469"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a470"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a471"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a472"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a473"></a><span class="src-doc"> * Get the current state of teh create documents flag.</span></div></li>
|
||||
<li><div class="src-line"><a name="a474"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a475"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">boolean </span></div></li>
|
||||
<li><div class="src-line"><a name="a476"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a477"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#methodgetCreateDocuments">getCreateDocuments</a><span class="src-sym">(</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a478"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a479"></a> <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#var$_createDocuments">_createDocuments</a><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a480"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a481"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a482"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a483"></a><span class="src-doc"> * Raw Add Method. Takes a raw post body and sends it to the update service. Post body</span></div></li>
|
||||
<li><div class="src-line"><a name="a484"></a><span class="src-doc"> * should be a complete and well formed "add" xml document.</span></div></li>
|
||||
<li><div class="src-line"><a name="a485"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a486"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$rawPost </span></div></li>
|
||||
<li><div class="src-line"><a name="a487"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">Apache_Solr_Response </span></div></li>
|
||||
<li><div class="src-line"><a name="a488"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a489"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@throws</span><span class="src-doc"> Apache_Solr_HttpTransportException If an error occurs during the service call</span></div></li>
|
||||
<li><div class="src-line"><a name="a490"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a491"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#methodadd">add</a><span class="src-sym">(</span><span class="src-var">$rawPost</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a492"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a493"></a> <span class="src-var">$service </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_selectWriteService">_selectWriteService</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a494"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a495"></a> do</div></li>
|
||||
<li><div class="src-line"><a name="a496"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a497"></a> try</div></li>
|
||||
<li><div class="src-line"><a name="a498"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a499"></a> <span class="src-key">return </span><span class="src-var">$service</span><span class="src-sym">-></span><span class="src-id">add</span><span class="src-sym">(</span><span class="src-var">$rawPost</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a500"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a501"></a> catch <span class="src-sym">(</span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_HttpTransportException.html">Apache_Solr_HttpTransportException</a> </span><span class="src-var">$e</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a502"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a503"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$e</span><span class="src-sym">-></span><span class="src-id">getCode</span><span class="src-sym">(</span><span class="src-sym">) </span>!= <span class="src-num">0</span><span class="src-sym">) </span><span class="src-comm">//IF NOT COMMUNICATION ERROR</span></div></li>
|
||||
<li><div class="src-line"><a name="a504"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a505"></a> throw <span class="src-var">$e</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a506"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a507"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a508"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a509"></a> <span class="src-var">$service </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_selectWriteService">_selectWriteService</a><span class="src-sym">(</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a510"></a> <span class="src-sym">} </span><span class="src-key">while </span><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a511"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a512"></a> <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a513"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a514"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a515"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a516"></a><span class="src-doc"> * Add a Solr Document to the index</span></div></li>
|
||||
<li><div class="src-line"><a name="a517"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a518"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">Apache_Solr_Document </span><span class="src-doc-var">$document </span></div></li>
|
||||
<li><div class="src-line"><a name="a519"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc-var">$allowDups </span></div></li>
|
||||
<li><div class="src-line"><a name="a520"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc-var">$overwritePending </span></div></li>
|
||||
<li><div class="src-line"><a name="a521"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc-var">$overwriteCommitted </span></div></li>
|
||||
<li><div class="src-line"><a name="a522"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">Apache_Solr_Response </span></div></li>
|
||||
<li><div class="src-line"><a name="a523"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a524"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@throws</span><span class="src-doc"> Apache_Solr_HttpTransportException If an error occurs during the service call</span></div></li>
|
||||
<li><div class="src-line"><a name="a525"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a526"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#methodaddDocument">addDocument</a><span class="src-sym">(</span><span class="src-id">Apache_Solr_Document </span><span class="src-var">$document</span><span class="src-sym">, </span><span class="src-var">$allowDups </span>= <span class="src-id">false</span><span class="src-sym">, </span><span class="src-var">$overwritePending </span>= <span class="src-id">true</span><span class="src-sym">, </span><span class="src-var">$overwriteCommitted </span>= <span class="src-id">true</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a527"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a528"></a> <span class="src-var">$service </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_selectWriteService">_selectWriteService</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a529"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a530"></a> do</div></li>
|
||||
<li><div class="src-line"><a name="a531"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a532"></a> try</div></li>
|
||||
<li><div class="src-line"><a name="a533"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a534"></a> <span class="src-key">return </span><span class="src-var">$service</span><span class="src-sym">-></span><span class="src-id">addDocument</span><span class="src-sym">(</span><span class="src-var">$document</span><span class="src-sym">, </span><span class="src-var">$allowDups</span><span class="src-sym">, </span><span class="src-var">$overwritePending</span><span class="src-sym">, </span><span class="src-var">$overwriteCommitted</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a535"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a536"></a> catch <span class="src-sym">(</span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_HttpTransportException.html">Apache_Solr_HttpTransportException</a> </span><span class="src-var">$e</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a537"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a538"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$e</span><span class="src-sym">-></span><span class="src-id">getCode</span><span class="src-sym">(</span><span class="src-sym">) </span>!= <span class="src-num">0</span><span class="src-sym">) </span><span class="src-comm">//IF NOT COMMUNICATION ERROR</span></div></li>
|
||||
<li><div class="src-line"><a name="a539"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a540"></a> throw <span class="src-var">$e</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a541"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a542"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a543"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a544"></a> <span class="src-var">$service </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_selectWriteService">_selectWriteService</a><span class="src-sym">(</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a545"></a> <span class="src-sym">} </span><span class="src-key">while </span><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a546"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a547"></a> <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a548"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a549"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a550"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a551"></a><span class="src-doc"> * Add an array of Solr Documents to the index all at once</span></div></li>
|
||||
<li><div class="src-line"><a name="a552"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a553"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">array </span><span class="src-doc-var">$documents </span><span class="src-doc">Should be an array of Apache_Solr_Document instances</span></div></li>
|
||||
<li><div class="src-line"><a name="a554"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc-var">$allowDups </span></div></li>
|
||||
<li><div class="src-line"><a name="a555"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc-var">$overwritePending </span></div></li>
|
||||
<li><div class="src-line"><a name="a556"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc-var">$overwriteCommitted </span></div></li>
|
||||
<li><div class="src-line"><a name="a557"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">Apache_Solr_Response </span></div></li>
|
||||
<li><div class="src-line"><a name="a558"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a559"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@throws</span><span class="src-doc"> Apache_Solr_HttpTransportException If an error occurs during the service call</span></div></li>
|
||||
<li><div class="src-line"><a name="a560"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a561"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#methodaddDocuments">addDocuments</a><span class="src-sym">(</span><span class="src-var">$documents</span><span class="src-sym">, </span><span class="src-var">$allowDups </span>= <span class="src-id">false</span><span class="src-sym">, </span><span class="src-var">$overwritePending </span>= <span class="src-id">true</span><span class="src-sym">, </span><span class="src-var">$overwriteCommitted </span>= <span class="src-id">true</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a562"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a563"></a> <span class="src-var">$service </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_selectWriteService">_selectWriteService</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a564"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a565"></a> do</div></li>
|
||||
<li><div class="src-line"><a name="a566"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a567"></a> try</div></li>
|
||||
<li><div class="src-line"><a name="a568"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a569"></a> <span class="src-key">return </span><span class="src-var">$service</span><span class="src-sym">-></span><span class="src-id">addDocuments</span><span class="src-sym">(</span><span class="src-var">$documents</span><span class="src-sym">, </span><span class="src-var">$allowDups</span><span class="src-sym">, </span><span class="src-var">$overwritePending</span><span class="src-sym">, </span><span class="src-var">$overwriteCommitted</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a570"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a571"></a> catch <span class="src-sym">(</span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_HttpTransportException.html">Apache_Solr_HttpTransportException</a> </span><span class="src-var">$e</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a572"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a573"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$e</span><span class="src-sym">-></span><span class="src-id">getCode</span><span class="src-sym">(</span><span class="src-sym">) </span>!= <span class="src-num">0</span><span class="src-sym">) </span><span class="src-comm">//IF NOT COMMUNICATION ERROR</span></div></li>
|
||||
<li><div class="src-line"><a name="a574"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a575"></a> throw <span class="src-var">$e</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a576"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a577"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a578"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a579"></a> <span class="src-var">$service </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_selectWriteService">_selectWriteService</a><span class="src-sym">(</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a580"></a> <span class="src-sym">} </span><span class="src-key">while </span><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a581"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a582"></a> <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a583"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a584"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a585"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a586"></a><span class="src-doc"> * Send a commit command. Will be synchronous unless both wait parameters are set</span></div></li>
|
||||
<li><div class="src-line"><a name="a587"></a><span class="src-doc"> * to false.</span></div></li>
|
||||
<li><div class="src-line"><a name="a588"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a589"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc-var">$waitFlush </span></div></li>
|
||||
<li><div class="src-line"><a name="a590"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc-var">$waitSearcher </span></div></li>
|
||||
<li><div class="src-line"><a name="a591"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">Apache_Solr_Response </span></div></li>
|
||||
<li><div class="src-line"><a name="a592"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a593"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@throws</span><span class="src-doc"> Apache_Solr_HttpTransportException If an error occurs during the service call</span></div></li>
|
||||
<li><div class="src-line"><a name="a594"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a595"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#methodcommit">commit</a><span class="src-sym">(</span><span class="src-var">$optimize </span>= <span class="src-id">true</span><span class="src-sym">, </span><span class="src-var">$waitFlush </span>= <span class="src-id">true</span><span class="src-sym">, </span><span class="src-var">$waitSearcher </span>= <span class="src-id">true</span><span class="src-sym">, </span><span class="src-var">$timeout </span>= <span class="src-num">3600</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a596"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a597"></a> <span class="src-var">$service </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_selectWriteService">_selectWriteService</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a598"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a599"></a> do</div></li>
|
||||
<li><div class="src-line"><a name="a600"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a601"></a> try</div></li>
|
||||
<li><div class="src-line"><a name="a602"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a603"></a> <span class="src-key">return </span><span class="src-var">$service</span><span class="src-sym">-></span><span class="src-id">commit</span><span class="src-sym">(</span><span class="src-var">$optimize</span><span class="src-sym">, </span><span class="src-var">$waitFlush</span><span class="src-sym">, </span><span class="src-var">$waitSearcher</span><span class="src-sym">, </span><span class="src-var">$timeout</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a604"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a605"></a> catch <span class="src-sym">(</span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_HttpTransportException.html">Apache_Solr_HttpTransportException</a> </span><span class="src-var">$e</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a606"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a607"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$e</span><span class="src-sym">-></span><span class="src-id">getCode</span><span class="src-sym">(</span><span class="src-sym">) </span>!= <span class="src-num">0</span><span class="src-sym">) </span><span class="src-comm">//IF NOT COMMUNICATION ERROR</span></div></li>
|
||||
<li><div class="src-line"><a name="a608"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a609"></a> throw <span class="src-var">$e</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a610"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a611"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a612"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a613"></a> <span class="src-var">$service </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_selectWriteService">_selectWriteService</a><span class="src-sym">(</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a614"></a> <span class="src-sym">} </span><span class="src-key">while </span><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a615"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a616"></a> <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a617"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a618"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a619"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a620"></a><span class="src-doc"> * Raw Delete Method. Takes a raw post body and sends it to the update service. Body should be</span></div></li>
|
||||
<li><div class="src-line"><a name="a621"></a><span class="src-doc"> * a complete and well formed "delete" xml document</span></div></li>
|
||||
<li><div class="src-line"><a name="a622"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a623"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$rawPost </span></div></li>
|
||||
<li><div class="src-line"><a name="a624"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">float </span><span class="src-doc-var">$timeout </span><span class="src-doc">Maximum expected duration of the delete operation on the server (otherwise, will throw a communication exception)</span></div></li>
|
||||
<li><div class="src-line"><a name="a625"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">Apache_Solr_Response </span></div></li>
|
||||
<li><div class="src-line"><a name="a626"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a627"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@throws</span><span class="src-doc"> Apache_Solr_HttpTransportException If an error occurs during the service call</span></div></li>
|
||||
<li><div class="src-line"><a name="a628"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a629"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#methoddelete">delete</a><span class="src-sym">(</span><span class="src-var">$rawPost</span><span class="src-sym">, </span><span class="src-var">$timeout </span>= <span class="src-num">3600</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a630"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a631"></a> <span class="src-var">$service </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_selectWriteService">_selectWriteService</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a632"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a633"></a> do</div></li>
|
||||
<li><div class="src-line"><a name="a634"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a635"></a> try</div></li>
|
||||
<li><div class="src-line"><a name="a636"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a637"></a> <span class="src-key">return </span><span class="src-var">$service</span><span class="src-sym">-></span><span class="src-id">delete</span><span class="src-sym">(</span><span class="src-var">$rawPost</span><span class="src-sym">, </span><span class="src-var">$timeout</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a638"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a639"></a> catch <span class="src-sym">(</span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_HttpTransportException.html">Apache_Solr_HttpTransportException</a> </span><span class="src-var">$e</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a640"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a641"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$e</span><span class="src-sym">-></span><span class="src-id">getCode</span><span class="src-sym">(</span><span class="src-sym">) </span>!= <span class="src-num">0</span><span class="src-sym">) </span><span class="src-comm">//IF NOT COMMUNICATION ERROR</span></div></li>
|
||||
<li><div class="src-line"><a name="a642"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a643"></a> throw <span class="src-var">$e</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a644"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a645"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a646"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a647"></a> <span class="src-var">$service </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_selectWriteService">_selectWriteService</a><span class="src-sym">(</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a648"></a> <span class="src-sym">} </span><span class="src-key">while </span><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a649"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a650"></a> <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a651"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a652"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a653"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a654"></a><span class="src-doc"> * Create a delete document based on document ID</span></div></li>
|
||||
<li><div class="src-line"><a name="a655"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a656"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$id </span></div></li>
|
||||
<li><div class="src-line"><a name="a657"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc-var">$fromPending </span></div></li>
|
||||
<li><div class="src-line"><a name="a658"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc-var">$fromCommitted </span></div></li>
|
||||
<li><div class="src-line"><a name="a659"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">float </span><span class="src-doc-var">$timeout </span><span class="src-doc">Maximum expected duration of the delete operation on the server (otherwise, will throw a communication exception)</span></div></li>
|
||||
<li><div class="src-line"><a name="a660"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">Apache_Solr_Response </span></div></li>
|
||||
<li><div class="src-line"><a name="a661"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a662"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@throws</span><span class="src-doc"> Apache_Solr_HttpTransportException If an error occurs during the service call</span></div></li>
|
||||
<li><div class="src-line"><a name="a663"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a664"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#methoddeleteById">deleteById</a><span class="src-sym">(</span><span class="src-var">$id</span><span class="src-sym">, </span><span class="src-var">$fromPending </span>= <span class="src-id">true</span><span class="src-sym">, </span><span class="src-var">$fromCommitted </span>= <span class="src-id">true</span><span class="src-sym">, </span><span class="src-var">$timeout </span>= <span class="src-num">3600</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a665"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a666"></a> <span class="src-var">$service </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_selectWriteService">_selectWriteService</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a667"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a668"></a> do</div></li>
|
||||
<li><div class="src-line"><a name="a669"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a670"></a> try</div></li>
|
||||
<li><div class="src-line"><a name="a671"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a672"></a> <span class="src-key">return </span><span class="src-var">$service</span><span class="src-sym">-></span><span class="src-id">deleteById</span><span class="src-sym">(</span><span class="src-var">$id</span><span class="src-sym">, </span><span class="src-var">$fromPending</span><span class="src-sym">, </span><span class="src-var">$fromCommitted</span><span class="src-sym">, </span><span class="src-var">$timeout</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a673"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a674"></a> catch <span class="src-sym">(</span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_HttpTransportException.html">Apache_Solr_HttpTransportException</a> </span><span class="src-var">$e</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a675"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a676"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$e</span><span class="src-sym">-></span><span class="src-id">getCode</span><span class="src-sym">(</span><span class="src-sym">) </span>!= <span class="src-num">0</span><span class="src-sym">) </span><span class="src-comm">//IF NOT COMMUNICATION ERROR</span></div></li>
|
||||
<li><div class="src-line"><a name="a677"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a678"></a> throw <span class="src-var">$e</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a679"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a680"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a681"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a682"></a> <span class="src-var">$service </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_selectWriteService">_selectWriteService</a><span class="src-sym">(</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a683"></a> <span class="src-sym">} </span><span class="src-key">while </span><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a684"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a685"></a> <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a686"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a687"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a688"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a689"></a><span class="src-doc"> * Create and post a delete document based on multiple document IDs.</span></div></li>
|
||||
<li><div class="src-line"><a name="a690"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a691"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">array </span><span class="src-doc-var">$ids </span><span class="src-doc">Expected to be utf-8 encoded strings</span></div></li>
|
||||
<li><div class="src-line"><a name="a692"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc-var">$fromPending </span></div></li>
|
||||
<li><div class="src-line"><a name="a693"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc-var">$fromCommitted </span></div></li>
|
||||
<li><div class="src-line"><a name="a694"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">float </span><span class="src-doc-var">$timeout </span><span class="src-doc">Maximum expected duration of the delete operation on the server (otherwise, will throw a communication exception)</span></div></li>
|
||||
<li><div class="src-line"><a name="a695"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">Apache_Solr_Response </span></div></li>
|
||||
<li><div class="src-line"><a name="a696"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a697"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@throws</span><span class="src-doc"> Apache_Solr_HttpTransportException If an error occurs during the service call</span></div></li>
|
||||
<li><div class="src-line"><a name="a698"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a699"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#methoddeleteByMultipleIds">deleteByMultipleIds</a><span class="src-sym">(</span><span class="src-var">$ids</span><span class="src-sym">, </span><span class="src-var">$fromPending </span>= <span class="src-id">true</span><span class="src-sym">, </span><span class="src-var">$fromCommitted </span>= <span class="src-id">true</span><span class="src-sym">, </span><span class="src-var">$timeout </span>= <span class="src-num">3600</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a700"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a701"></a> <span class="src-var">$service </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_selectWriteService">_selectWriteService</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a702"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a703"></a> do</div></li>
|
||||
<li><div class="src-line"><a name="a704"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a705"></a> try</div></li>
|
||||
<li><div class="src-line"><a name="a706"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a707"></a> <span class="src-key">return </span><span class="src-var">$service</span><span class="src-sym">-></span><span class="src-id">deleteByMultipleId</span><span class="src-sym">(</span><span class="src-var">$ids</span><span class="src-sym">, </span><span class="src-var">$fromPending</span><span class="src-sym">, </span><span class="src-var">$fromCommitted</span><span class="src-sym">, </span><span class="src-var">$timeout</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a708"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a709"></a> catch <span class="src-sym">(</span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_HttpTransportException.html">Apache_Solr_HttpTransportException</a> </span><span class="src-var">$e</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a710"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a711"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$e</span><span class="src-sym">-></span><span class="src-id">getCode</span><span class="src-sym">(</span><span class="src-sym">) </span>!= <span class="src-num">0</span><span class="src-sym">) </span><span class="src-comm">//IF NOT COMMUNICATION ERROR</span></div></li>
|
||||
<li><div class="src-line"><a name="a712"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a713"></a> throw <span class="src-var">$e</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a714"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a715"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a716"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a717"></a> <span class="src-var">$service </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_selectWriteService">_selectWriteService</a><span class="src-sym">(</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a718"></a> <span class="src-sym">} </span><span class="src-key">while </span><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a719"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a720"></a> <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a721"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a722"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a723"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a724"></a><span class="src-doc"> * Create a delete document based on a query and submit it</span></div></li>
|
||||
<li><div class="src-line"><a name="a725"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a726"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$rawQuery </span></div></li>
|
||||
<li><div class="src-line"><a name="a727"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc-var">$fromPending </span></div></li>
|
||||
<li><div class="src-line"><a name="a728"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc-var">$fromCommitted </span></div></li>
|
||||
<li><div class="src-line"><a name="a729"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">float </span><span class="src-doc-var">$timeout </span><span class="src-doc">Maximum expected duration of the delete operation on the server (otherwise, will throw a communication exception)</span></div></li>
|
||||
<li><div class="src-line"><a name="a730"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">Apache_Solr_Response </span></div></li>
|
||||
<li><div class="src-line"><a name="a731"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a732"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@throws</span><span class="src-doc"> Apache_Solr_HttpTransportException If an error occurs during the service call</span></div></li>
|
||||
<li><div class="src-line"><a name="a733"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a734"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#methoddeleteByQuery">deleteByQuery</a><span class="src-sym">(</span><span class="src-var">$rawQuery</span><span class="src-sym">, </span><span class="src-var">$fromPending </span>= <span class="src-id">true</span><span class="src-sym">, </span><span class="src-var">$fromCommitted </span>= <span class="src-id">true</span><span class="src-sym">, </span><span class="src-var">$timeout </span>= <span class="src-num">3600</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a735"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a736"></a> <span class="src-var">$service </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_selectWriteService">_selectWriteService</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a737"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a738"></a> do</div></li>
|
||||
<li><div class="src-line"><a name="a739"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a740"></a> try</div></li>
|
||||
<li><div class="src-line"><a name="a741"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a742"></a> <span class="src-key">return </span><span class="src-var">$service</span><span class="src-sym">-></span><span class="src-id">deleteByQuery</span><span class="src-sym">(</span><span class="src-var">$rawQuery</span><span class="src-sym">, </span><span class="src-var">$fromPending</span><span class="src-sym">, </span><span class="src-var">$fromCommitted</span><span class="src-sym">, </span><span class="src-var">$timeout</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a743"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a744"></a> catch <span class="src-sym">(</span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_HttpTransportException.html">Apache_Solr_HttpTransportException</a> </span><span class="src-var">$e</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a745"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a746"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$e</span><span class="src-sym">-></span><span class="src-id">getCode</span><span class="src-sym">(</span><span class="src-sym">) </span>!= <span class="src-num">0</span><span class="src-sym">) </span><span class="src-comm">//IF NOT COMMUNICATION ERROR</span></div></li>
|
||||
<li><div class="src-line"><a name="a747"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a748"></a> throw <span class="src-var">$e</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a749"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a750"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a751"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a752"></a> <span class="src-var">$service </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_selectWriteService">_selectWriteService</a><span class="src-sym">(</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a753"></a> <span class="src-sym">} </span><span class="src-key">while </span><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a754"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a755"></a> <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a756"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a757"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a758"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a759"></a><span class="src-doc"> * Use Solr Cell to extract document contents. See </span><span class="src-doc-inlinetag">{@link http://wiki.apache.org/solr/ExtractingRequestHandler}</span><span class="src-doc"> for information on how</span></div></li>
|
||||
<li><div class="src-line"><a name="a760"></a><span class="src-doc"> * to use Solr Cell and what parameters are available.</span></div></li>
|
||||
<li><div class="src-line"><a name="a761"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a762"></a><span class="src-doc"> * NOTE: when passing an Apache_Solr_Document instance, field names and boosts will automatically be prepended by "literal." and "boost."</span></div></li>
|
||||
<li><div class="src-line"><a name="a763"></a><span class="src-doc"> * as appropriate. Any keys from the $params array will NOT be treated this way. Any mappings from the document will overwrite key / value</span></div></li>
|
||||
<li><div class="src-line"><a name="a764"></a><span class="src-doc"> * pairs in the params array if they have the same name (e.g. you pass a "literal.id" key and value in your $params array but you also</span></div></li>
|
||||
<li><div class="src-line"><a name="a765"></a><span class="src-doc"> * pass in a document isntance with an "id" field" - the document's value(s) will take precedence).</span></div></li>
|
||||
<li><div class="src-line"><a name="a766"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a767"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$file </span><span class="src-doc">Path to file to extract data from</span></div></li>
|
||||
<li><div class="src-line"><a name="a768"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">array </span><span class="src-doc-var">$params </span><span class="src-doc">optional array of key value pairs that will be sent with the post (see Solr Cell documentation)</span></div></li>
|
||||
<li><div class="src-line"><a name="a769"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">Apache_Solr_Document </span><span class="src-doc-var">$document </span><span class="src-doc">optional document that will be used to generate post parameters (literal.* and boost.* params)</span></div></li>
|
||||
<li><div class="src-line"><a name="a770"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$mimetype </span><span class="src-doc">optional mimetype specification (for the file being extracted)</span></div></li>
|
||||
<li><div class="src-line"><a name="a771"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a772"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">Apache_Solr_Response </span></div></li>
|
||||
<li><div class="src-line"><a name="a773"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a774"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@throws</span><span class="src-doc"> Apache_Solr_InvalidArgumentException if $file, $params, or $document are invalid.</span></div></li>
|
||||
<li><div class="src-line"><a name="a775"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a776"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#methodextract">extract</a><span class="src-sym">(</span><span class="src-var">$file</span><span class="src-sym">, </span><span class="src-var">$params </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$document </span>= <span class="src-id">null</span><span class="src-sym">, </span><span class="src-var">$mimetype </span>= <span class="src-str">'application/octet-stream'</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a777"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a778"></a> <span class="src-var">$service </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_selectWriteService">_selectWriteService</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a779"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a780"></a> do</div></li>
|
||||
<li><div class="src-line"><a name="a781"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a782"></a> try</div></li>
|
||||
<li><div class="src-line"><a name="a783"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a784"></a> <span class="src-key">return </span><span class="src-var">$service</span><span class="src-sym">-></span><span class="src-id">extract</span><span class="src-sym">(</span><span class="src-var">$file</span><span class="src-sym">, </span><span class="src-var">$params</span><span class="src-sym">, </span><span class="src-var">$document</span><span class="src-sym">, </span><span class="src-var">$mimetype</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a785"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a786"></a> catch <span class="src-sym">(</span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_HttpTransportException.html">Apache_Solr_HttpTransportException</a> </span><span class="src-var">$e</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a787"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a788"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$e</span><span class="src-sym">-></span><span class="src-id">getCode</span><span class="src-sym">(</span><span class="src-sym">) </span>!= <span class="src-num">0</span><span class="src-sym">) </span><span class="src-comm">//IF NOT COMMUNICATION ERROR</span></div></li>
|
||||
<li><div class="src-line"><a name="a789"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a790"></a> throw <span class="src-var">$e</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a791"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a792"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a793"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a794"></a> <span class="src-var">$service </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_selectWriteService">_selectWriteService</a><span class="src-sym">(</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a795"></a> <span class="src-sym">} </span><span class="src-key">while </span><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a796"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a797"></a> <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a798"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a799"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a800"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a801"></a><span class="src-doc"> * Use Solr Cell to extract document contents. See </span><span class="src-doc-inlinetag">{@link http://wiki.apache.org/solr/ExtractingRequestHandler}</span><span class="src-doc"> for information on how</span></div></li>
|
||||
<li><div class="src-line"><a name="a802"></a><span class="src-doc"> * to use Solr Cell and what parameters are available.</span></div></li>
|
||||
<li><div class="src-line"><a name="a803"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a804"></a><span class="src-doc"> * NOTE: when passing an Apache_Solr_Document instance, field names and boosts will automatically be prepended by "literal." and "boost."</span></div></li>
|
||||
<li><div class="src-line"><a name="a805"></a><span class="src-doc"> * as appropriate. Any keys from the $params array will NOT be treated this way. Any mappings from the document will overwrite key / value</span></div></li>
|
||||
<li><div class="src-line"><a name="a806"></a><span class="src-doc"> * pairs in the params array if they have the same name (e.g. you pass a "literal.id" key and value in your $params array but you also</span></div></li>
|
||||
<li><div class="src-line"><a name="a807"></a><span class="src-doc"> * pass in a document isntance with an "id" field" - the document's value(s) will take precedence).</span></div></li>
|
||||
<li><div class="src-line"><a name="a808"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a809"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$data </span><span class="src-doc">Data that will be passed to Solr Cell</span></div></li>
|
||||
<li><div class="src-line"><a name="a810"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">array </span><span class="src-doc-var">$params </span><span class="src-doc">optional array of key value pairs that will be sent with the post (see Solr Cell documentation)</span></div></li>
|
||||
<li><div class="src-line"><a name="a811"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">Apache_Solr_Document </span><span class="src-doc-var">$document </span><span class="src-doc">optional document that will be used to generate post parameters (literal.* and boost.* params)</span></div></li>
|
||||
<li><div class="src-line"><a name="a812"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$mimetype </span><span class="src-doc">optional mimetype specification (for the file being extracted)</span></div></li>
|
||||
<li><div class="src-line"><a name="a813"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a814"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">Apache_Solr_Response </span></div></li>
|
||||
<li><div class="src-line"><a name="a815"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a816"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@throws</span><span class="src-doc"> Apache_Solr_InvalidArgumentException if $file, $params, or $document are invalid.</span></div></li>
|
||||
<li><div class="src-line"><a name="a817"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a818"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> Should be using multipart/form-data to post parameter values, but I could not get my implementation to work. Needs revisisted.</span></div></li>
|
||||
<li><div class="src-line"><a name="a819"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a820"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#methodextractFromString">extractFromString</a><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">, </span><span class="src-var">$params </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$document </span>= <span class="src-id">null</span><span class="src-sym">, </span><span class="src-var">$mimetype </span>= <span class="src-str">'application/octet-stream'</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a821"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a822"></a> <span class="src-var">$service </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_selectWriteService">_selectWriteService</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a823"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a824"></a> do</div></li>
|
||||
<li><div class="src-line"><a name="a825"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a826"></a> try</div></li>
|
||||
<li><div class="src-line"><a name="a827"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a828"></a> <span class="src-key">return </span><span class="src-var">$service</span><span class="src-sym">-></span><span class="src-id">extractFromString</span><span class="src-sym">(</span><span class="src-var">$data</span><span class="src-sym">, </span><span class="src-var">$params</span><span class="src-sym">, </span><span class="src-var">$document</span><span class="src-sym">, </span><span class="src-var">$mimetype</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a829"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a830"></a> catch <span class="src-sym">(</span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_HttpTransportException.html">Apache_Solr_HttpTransportException</a> </span><span class="src-var">$e</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a831"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a832"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$e</span><span class="src-sym">-></span><span class="src-id">getCode</span><span class="src-sym">(</span><span class="src-sym">) </span>!= <span class="src-num">0</span><span class="src-sym">) </span><span class="src-comm">//IF NOT COMMUNICATION ERROR</span></div></li>
|
||||
<li><div class="src-line"><a name="a833"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a834"></a> throw <span class="src-var">$e</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a835"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a836"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a837"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a838"></a> <span class="src-var">$service </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_selectWriteService">_selectWriteService</a><span class="src-sym">(</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a839"></a> <span class="src-sym">} </span><span class="src-key">while </span><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a840"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a841"></a> <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a842"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a843"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a844"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a845"></a><span class="src-doc"> * Send an optimize command. Will be synchronous unless both wait parameters are set</span></div></li>
|
||||
<li><div class="src-line"><a name="a846"></a><span class="src-doc"> * to false.</span></div></li>
|
||||
<li><div class="src-line"><a name="a847"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a848"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc-var">$waitFlush </span></div></li>
|
||||
<li><div class="src-line"><a name="a849"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc-var">$waitSearcher </span></div></li>
|
||||
<li><div class="src-line"><a name="a850"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">float </span><span class="src-doc-var">$timeout </span><span class="src-doc">Maximum expected duration of the optimize operation on the server (otherwise, will throw a communication exception)</span></div></li>
|
||||
<li><div class="src-line"><a name="a851"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">Apache_Solr_Response </span></div></li>
|
||||
<li><div class="src-line"><a name="a852"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a853"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@throws</span><span class="src-doc"> Apache_Solr_HttpTransportException If an error occurs during the service call</span></div></li>
|
||||
<li><div class="src-line"><a name="a854"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a855"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#methodoptimize">optimize</a><span class="src-sym">(</span><span class="src-var">$waitFlush </span>= <span class="src-id">true</span><span class="src-sym">, </span><span class="src-var">$waitSearcher </span>= <span class="src-id">true</span><span class="src-sym">, </span><span class="src-var">$timeout </span>= <span class="src-num">3600</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a856"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a857"></a> <span class="src-var">$service </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_selectWriteService">_selectWriteService</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a858"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a859"></a> do</div></li>
|
||||
<li><div class="src-line"><a name="a860"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a861"></a> try</div></li>
|
||||
<li><div class="src-line"><a name="a862"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a863"></a> <span class="src-key">return </span><span class="src-var">$service</span><span class="src-sym">-></span><span class="src-id">optimize</span><span class="src-sym">(</span><span class="src-var">$waitFlush</span><span class="src-sym">, </span><span class="src-var">$waitSearcher</span><span class="src-sym">, </span><span class="src-var">$timeout</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a864"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a865"></a> catch <span class="src-sym">(</span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_HttpTransportException.html">Apache_Solr_HttpTransportException</a> </span><span class="src-var">$e</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a866"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a867"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$e</span><span class="src-sym">-></span><span class="src-id">getCode</span><span class="src-sym">(</span><span class="src-sym">) </span>!= <span class="src-num">0</span><span class="src-sym">) </span><span class="src-comm">//IF NOT COMMUNICATION ERROR</span></div></li>
|
||||
<li><div class="src-line"><a name="a868"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a869"></a> throw <span class="src-var">$e</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a870"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a871"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a872"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a873"></a> <span class="src-var">$service </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_selectWriteService">_selectWriteService</a><span class="src-sym">(</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a874"></a> <span class="src-sym">} </span><span class="src-key">while </span><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a875"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a876"></a> <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a877"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a878"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a879"></a> <span class="src-doc">/**</span></div></li>
|
||||
<li><div class="src-line"><a name="a880"></a><span class="src-doc"> * Simple Search interface</span></div></li>
|
||||
<li><div class="src-line"><a name="a881"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a882"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$query </span><span class="src-doc">The raw query string</span></div></li>
|
||||
<li><div class="src-line"><a name="a883"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">int </span><span class="src-doc-var">$offset </span><span class="src-doc">The starting offset for result documents</span></div></li>
|
||||
<li><div class="src-line"><a name="a884"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">int </span><span class="src-doc-var">$limit </span><span class="src-doc">The maximum number of result documents to return</span></div></li>
|
||||
<li><div class="src-line"><a name="a885"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">array </span><span class="src-doc-var">$params </span><span class="src-doc">key / value pairs for query parameters, use arrays for multivalued parameters</span></div></li>
|
||||
<li><div class="src-line"><a name="a886"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$method </span><span class="src-doc">The HTTP method (Apache_Solr_Service::METHOD_GET or Apache_Solr_Service::METHOD::POST)</span></div></li>
|
||||
<li><div class="src-line"><a name="a887"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">Apache_Solr_Response </span></div></li>
|
||||
<li><div class="src-line"><a name="a888"></a><span class="src-doc"> *</span></div></li>
|
||||
<li><div class="src-line"><a name="a889"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@throws</span><span class="src-doc"> Apache_Solr_HttpTransportException If an error occurs during the service call</span></div></li>
|
||||
<li><div class="src-line"><a name="a890"></a><span class="src-doc"> */</span></div></li>
|
||||
<li><div class="src-line"><a name="a891"></a> <span class="src-key">public </span><span class="src-key">function </span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#methodsearch">search</a><span class="src-sym">(</span><span class="src-var">$query</span><span class="src-sym">, </span><span class="src-var">$offset </span>= <span class="src-num">0</span><span class="src-sym">, </span><span class="src-var">$limit </span>= <span class="src-num">10</span><span class="src-sym">, </span><span class="src-var">$params </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$method </span>= <span class="src-id">Apache_Solr_Service</span><span class="src-sym">::</span><span class="src-id">METHOD_GET</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a892"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a893"></a> <span class="src-var">$service </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_selectReadService">_selectReadService</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a894"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a895"></a> do</div></li>
|
||||
<li><div class="src-line"><a name="a896"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a897"></a> try</div></li>
|
||||
<li><div class="src-line"><a name="a898"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a899"></a> <span class="src-key">return </span><span class="src-var">$service</span><span class="src-sym">-></span><span class="src-id">search</span><span class="src-sym">(</span><span class="src-var">$query</span><span class="src-sym">, </span><span class="src-var">$offset</span><span class="src-sym">, </span><span class="src-var">$limit</span><span class="src-sym">, </span><span class="src-var">$params</span><span class="src-sym">, </span><span class="src-var">$method</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a900"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a901"></a> catch <span class="src-sym">(</span><span class="src-id"><a href="../Apache/Solr/Apache_Solr_HttpTransportException.html">Apache_Solr_HttpTransportException</a> </span><span class="src-var">$e</span><span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"><a name="a902"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a903"></a> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-var">$e</span><span class="src-sym">-></span><span class="src-id">getCode</span><span class="src-sym">(</span><span class="src-sym">) </span>!= <span class="src-num">0</span><span class="src-sym">) </span><span class="src-comm">//IF NOT COMMUNICATION ERROR</span></div></li>
|
||||
<li><div class="src-line"><a name="a904"></a> <span class="src-sym">{</span></div></li>
|
||||
<li><div class="src-line"><a name="a905"></a> throw <span class="src-var">$e</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a906"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a907"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a908"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a909"></a> <span class="src-var">$service </span>= <span class="src-var">$this</span><span class="src-sym">-></span><a href="../Apache/Solr/Apache_Solr_Service_Balancer.html#method_selectReadService">_selectReadService</a><span class="src-sym">(</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a910"></a> <span class="src-sym">} </span><span class="src-key">while </span><span class="src-sym">(</span><span class="src-var">$service</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a911"></a> </div></li>
|
||||
<li><div class="src-line"><a name="a912"></a> <span class="src-key">return </span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"><a name="a913"></a> <span class="src-sym">}</span></div></li>
|
||||
<li><div class="src-line"><a name="a914"></a><span class="src-sym">}</span></div></li>
|
||||
</ol></div>
|
||||
</div>
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:10 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
13
SolrPhpClient/phpdocs/blank.html
Normal file
13
SolrPhpClient/phpdocs/blank.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Generated Documentation</title>
|
||||
<link rel="stylesheet" href="media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div align="center"><h1>Generated Documentation</h1></div>
|
||||
<b>Welcome to Apache!</b><br />
|
||||
<br />
|
||||
This documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor v1.4.3</a><br />
|
||||
</body>
|
||||
</html>
|
||||
56
SolrPhpClient/phpdocs/classtrees_Apache.html
Normal file
56
SolrPhpClient/phpdocs/classtrees_Apache.html
Normal file
@@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title></title>
|
||||
<link rel="stylesheet" href="media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Start of Class Data -->
|
||||
<H2>
|
||||
|
||||
</H2>
|
||||
<h2>Root interface Apache_Solr_HttpTransport_Interface</h2>
|
||||
<ul>
|
||||
<li><a href="Apache/Solr/Apache_Solr_HttpTransport_Interface.html">Apache_Solr_HttpTransport_Interface</a></li></ul>
|
||||
|
||||
<h2>Root class Apache_Solr_Document</h2>
|
||||
<ul>
|
||||
<li><a href="Apache/Solr/Apache_Solr_Document.html">Apache_Solr_Document</a></li></ul>
|
||||
|
||||
<h2>Root class Apache_Solr_HttpTransport_Abstract</h2>
|
||||
<ul>
|
||||
<li><a href="Apache/Solr/Apache_Solr_HttpTransport_Abstract.html">Apache_Solr_HttpTransport_Abstract</a> (implements <a href="Apache/Solr/Apache_Solr_HttpTransport_Interface.html">Apache_Solr_HttpTransport_Interface</a>)<ul>
|
||||
<li><a href="Apache/Solr/Apache_Solr_HttpTransport_Curl.html">Apache_Solr_HttpTransport_Curl</a></li><li><a href="Apache/Solr/Apache_Solr_HttpTransport_CurlNoReuse.html">Apache_Solr_HttpTransport_CurlNoReuse</a></li><li><a href="Apache/Solr/Apache_Solr_HttpTransport_FileGetContents.html">Apache_Solr_HttpTransport_FileGetContents</a></li></ul></li>
|
||||
</ul>
|
||||
|
||||
<h2>Root class Apache_Solr_HttpTransport_Response</h2>
|
||||
<ul>
|
||||
<li><a href="Apache/Solr/Apache_Solr_HttpTransport_Response.html">Apache_Solr_HttpTransport_Response</a></li></ul>
|
||||
|
||||
<h2>Root class Apache_Solr_Response</h2>
|
||||
<ul>
|
||||
<li><a href="Apache/Solr/Apache_Solr_Response.html">Apache_Solr_Response</a></li></ul>
|
||||
|
||||
<h2>Root class Apache_Solr_Service</h2>
|
||||
<ul>
|
||||
<li><a href="Apache/Solr/Apache_Solr_Service.html">Apache_Solr_Service</a></li></ul>
|
||||
|
||||
<h2>Root class Apache_Solr_Service_Balancer</h2>
|
||||
<ul>
|
||||
<li><a href="Apache/Solr/Apache_Solr_Service_Balancer.html">Apache_Solr_Service_Balancer</a></li></ul>
|
||||
|
||||
<h2>Root class Exception</h2>
|
||||
<ul>
|
||||
<li><a href="Apache/Solr/Apache_Solr_Exception.html">Apache_Solr_Exception</a><ul>
|
||||
<li><a href="Apache/Solr/Apache_Solr_HttpTransportException.html">Apache_Solr_HttpTransportException</a></li><li><a href="Apache/Solr/Apache_Solr_InvalidArgumentException.html">Apache_Solr_InvalidArgumentException</a></li><li><a href="Apache/Solr/Apache_Solr_NoServiceAvailableException.html">Apache_Solr_NoServiceAvailableException</a></li><li><a href="Apache/Solr/Apache_Solr_ParserException.html">Apache_Solr_ParserException</a></li></ul></li>
|
||||
</ul>
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:08 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
1726
SolrPhpClient/phpdocs/elementindex.html
Normal file
1726
SolrPhpClient/phpdocs/elementindex.html
Normal file
File diff suppressed because it is too large
Load Diff
1723
SolrPhpClient/phpdocs/elementindex_Apache.html
Normal file
1723
SolrPhpClient/phpdocs/elementindex_Apache.html
Normal file
File diff suppressed because it is too large
Load Diff
95
SolrPhpClient/phpdocs/errors.html
Normal file
95
SolrPhpClient/phpdocs/errors.html
Normal file
@@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>phpDocumentor Parser Errors and Warnings</title>
|
||||
<link rel="stylesheet" href="media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<a href="#Post-parsing">Post-parsing</a><br>
|
||||
<a href="#Balancer.php">Balancer.php</a><br>
|
||||
<a href="#Curl.php">Curl.php</a><br>
|
||||
<a href="#CurlNoReuse.php">CurlNoReuse.php</a><br>
|
||||
<a href="#Document.php">Document.php</a><br>
|
||||
<a href="#Exception.php">Exception.php</a><br>
|
||||
<a href="#FileGetContents.php">FileGetContents.php</a><br>
|
||||
<a href="#HttpTransportException.php">HttpTransportException.php</a><br>
|
||||
<a href="#Interface.php">Interface.php</a><br>
|
||||
<a href="#InvalidArgumentException.php">InvalidArgumentException.php</a><br>
|
||||
<a href="#NoServiceAvailableException.php">NoServiceAvailableException.php</a><br>
|
||||
<a href="#ParserException.php">ParserException.php</a><br>
|
||||
<a href="#Response.php">Response.php</a><br>
|
||||
<a href="#Service.php">Service.php</a><br>
|
||||
<a name="Abstract.php"></a>
|
||||
<h1>Abstract.php</h1>
|
||||
<h2>Warnings:</h2><br>
|
||||
<b>Warning on line 43</b> - no @package tag was used in a DocBlock for class Apache_Solr_HttpTransport_Abstract<br>
|
||||
<a name="Balancer.php"></a>
|
||||
<h1>Balancer.php</h1>
|
||||
<h2>Warnings:</h2><br>
|
||||
<b>Warning on line 40</b> - Page-level DocBlock precedes "require_once dirname(dirname(__FILE__)).'/Service.php'", use another DocBlock to document the source element<br>
|
||||
<b>Warning on line 51</b> - no @package tag was used in a DocBlock for class Apache_Solr_Service_Balancer<br>
|
||||
<a name="Curl.php"></a>
|
||||
<h1>Curl.php</h1>
|
||||
<h2>Warnings:</h2><br>
|
||||
<b>Warning on line 39</b> - Page-level DocBlock precedes "require_once dirname(__FILE__).'/Abstract.php'", use another DocBlock to document the source element<br>
|
||||
<b>Warning on line 45</b> - no @package tag was used in a DocBlock for class Apache_Solr_HttpTransport_Curl<br>
|
||||
<a name="CurlNoReuse.php"></a>
|
||||
<h1>CurlNoReuse.php</h1>
|
||||
<h2>Warnings:</h2><br>
|
||||
<b>Warning on line 39</b> - Page-level DocBlock precedes "require_once dirname(__FILE__).'/Abstract.php'", use another DocBlock to document the source element<br>
|
||||
<b>Warning on line 47</b> - no @package tag was used in a DocBlock for class Apache_Solr_HttpTransport_CurlNoReuse<br>
|
||||
<a name="Document.php"></a>
|
||||
<h1>Document.php</h1>
|
||||
<h2>Warnings:</h2><br>
|
||||
<b>Warning on line 58</b> - no @package tag was used in a DocBlock for class Apache_Solr_Document<br>
|
||||
<h2>Errors:</h2><br>
|
||||
<b>Error on line 57</b> - Unclosed code tag in DocBlock, parsing will be incorrect<br>
|
||||
<a name="Exception.php"></a>
|
||||
<h1>Exception.php</h1>
|
||||
<h2>Warnings:</h2><br>
|
||||
<b>Warning on line 39</b> - DocBlock would be page-level, but precedes class "Apache_Solr_Exception", use another DocBlock to document the file<br>
|
||||
<a name="FileGetContents.php"></a>
|
||||
<h1>FileGetContents.php</h1>
|
||||
<h2>Warnings:</h2><br>
|
||||
<b>Warning on line 39</b> - Page-level DocBlock precedes "require_once dirname(__FILE__).'/Abstract.php'", use another DocBlock to document the source element<br>
|
||||
<b>Warning on line 45</b> - no @package tag was used in a DocBlock for class Apache_Solr_HttpTransport_FileGetContents<br>
|
||||
<a name="HttpTransportException.php"></a>
|
||||
<h1>HttpTransportException.php</h1>
|
||||
<h2>Warnings:</h2><br>
|
||||
<b>Warning on line 39</b> - DocBlock would be page-level, but precedes class "Apache_Solr_HttpTransportException", use another DocBlock to document the file<br>
|
||||
<a name="Interface.php"></a>
|
||||
<h1>Interface.php</h1>
|
||||
<h2>Warnings:</h2><br>
|
||||
<b>Warning on line 39</b> - Page-level DocBlock precedes "require_once dirname(__FILE__).'/Response.php'", use another DocBlock to document the source element<br>
|
||||
<b>Warning on line 47</b> - no @package tag was used in a DocBlock for interface Apache_Solr_HttpTransport_Interface<br>
|
||||
<a name="InvalidArgumentException.php"></a>
|
||||
<h1>InvalidArgumentException.php</h1>
|
||||
<h2>Warnings:</h2><br>
|
||||
<b>Warning on line 39</b> - DocBlock would be page-level, but precedes class "Apache_Solr_InvalidArgumentException", use another DocBlock to document the file<br>
|
||||
<a name="NoServiceAvailableException.php"></a>
|
||||
<h1>NoServiceAvailableException.php</h1>
|
||||
<h2>Warnings:</h2><br>
|
||||
<b>Warning on line 39</b> - DocBlock would be page-level, but precedes class "Apache_Solr_NoServiceAvailableException", use another DocBlock to document the file<br>
|
||||
<a name="ParserException.php"></a>
|
||||
<h1>ParserException.php</h1>
|
||||
<h2>Warnings:</h2><br>
|
||||
<b>Warning on line 39</b> - DocBlock would be page-level, but precedes class "Apache_Solr_ParserException", use another DocBlock to document the file<br>
|
||||
<a name="Response.php"></a>
|
||||
<h1>Response.php</h1>
|
||||
<h2>Warnings:</h2><br>
|
||||
<b>Warning on line 38</b> - Page-level DocBlock precedes "require_once dirname(__FILE__).'/ParserException.php'", use another DocBlock to document the source element<br>
|
||||
<b>Warning on line 44</b> - no @package tag was used in a DocBlock for class Apache_Solr_HttpTransport_Response<br>
|
||||
<b>Warning on line 48</b> - no @package tag was used in a DocBlock for class Apache_Solr_Response<br>
|
||||
<a name="Service.php"></a>
|
||||
<h1>Service.php</h1>
|
||||
<h2>Warnings:</h2><br>
|
||||
<b>Warning on line 40</b> - Page-level DocBlock precedes "require_once dirname(__FILE__).'/Exception.php'", use another DocBlock to document the source element<br>
|
||||
<b>Warning on line 86</b> - no @package tag was used in a DocBlock for class Apache_Solr_Service<br>
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:19 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
24
SolrPhpClient/phpdocs/index.html
Normal file
24
SolrPhpClient/phpdocs/index.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//FR"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- Generated by phpDocumentor on Wed, 04 May 2011 11:01:08 -0400 -->
|
||||
<title>Generated Documentation</title>
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
|
||||
<FRAMESET rows='120,*'>
|
||||
<FRAME src='packages.html' name='left_top' frameborder="1" bordercolor="#999999">
|
||||
<FRAMESET cols='25%,*'>
|
||||
<FRAME src='li_Apache.html' name='left_bottom' frameborder="1" bordercolor="#999999">
|
||||
<FRAME src='blank.html' name='right' frameborder="1" bordercolor="#999999">
|
||||
</FRAMESET>
|
||||
<NOFRAMES>
|
||||
<H2>Frame Alert</H2>
|
||||
<P>This document is designed to be viewed using the frames feature.
|
||||
If you see this message, you are using a non-frame-capable web client.</P>
|
||||
</NOFRAMES>
|
||||
</FRAMESET>
|
||||
</HTML>
|
||||
72
SolrPhpClient/phpdocs/li_Apache.html
Normal file
72
SolrPhpClient/phpdocs/li_Apache.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title></title>
|
||||
<link rel="stylesheet" href="media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="package-title">Apache</div>
|
||||
<div class="package-details">
|
||||
|
||||
<dl class="tree">
|
||||
|
||||
<dt class="folder-title">Description</dt>
|
||||
<dd>
|
||||
<a href='classtrees_Apache.html' target='right'>Class trees</a><br />
|
||||
<a href='elementindex_Apache.html' target='right'>Index of elements</a><br />
|
||||
<a href="todolist.html" target="right">Todo List</a><br />
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="sub-package">Solr</dt>
|
||||
<dd>
|
||||
<dl class="tree">
|
||||
<dt class="folder-title">Classes</dt>
|
||||
<dd><a href='Apache/Solr/Apache_Solr_Document.html' target='right'>Apache_Solr_Document</a></dd>
|
||||
<dd><a href='Apache/Solr/Apache_Solr_Exception.html' target='right'>Apache_Solr_Exception</a></dd>
|
||||
<dd><a href='Apache/Solr/Apache_Solr_HttpTransportException.html' target='right'>Apache_Solr_HttpTransportException</a></dd>
|
||||
<dd><a href='Apache/Solr/Apache_Solr_HttpTransport_Abstract.html' target='right'>Apache_Solr_HttpTransport_Abstract</a></dd>
|
||||
<dd><a href='Apache/Solr/Apache_Solr_HttpTransport_Curl.html' target='right'>Apache_Solr_HttpTransport_Curl</a></dd>
|
||||
<dd><a href='Apache/Solr/Apache_Solr_HttpTransport_CurlNoReuse.html' target='right'>Apache_Solr_HttpTransport_CurlNoReuse</a></dd>
|
||||
<dd><a href='Apache/Solr/Apache_Solr_HttpTransport_FileGetContents.html' target='right'>Apache_Solr_HttpTransport_FileGetContents</a></dd>
|
||||
<dd><a href='Apache/Solr/Apache_Solr_HttpTransport_Interface.html' target='right'>Apache_Solr_HttpTransport_Interface</a></dd>
|
||||
<dd><a href='Apache/Solr/Apache_Solr_HttpTransport_Response.html' target='right'>Apache_Solr_HttpTransport_Response</a></dd>
|
||||
<dd><a href='Apache/Solr/Apache_Solr_InvalidArgumentException.html' target='right'>Apache_Solr_InvalidArgumentException</a></dd>
|
||||
<dd><a href='Apache/Solr/Apache_Solr_NoServiceAvailableException.html' target='right'>Apache_Solr_NoServiceAvailableException</a></dd>
|
||||
<dd><a href='Apache/Solr/Apache_Solr_ParserException.html' target='right'>Apache_Solr_ParserException</a></dd>
|
||||
<dd><a href='Apache/Solr/Apache_Solr_Response.html' target='right'>Apache_Solr_Response</a></dd>
|
||||
<dd><a href='Apache/Solr/Apache_Solr_Service.html' target='right'>Apache_Solr_Service</a></dd>
|
||||
<dd><a href='Apache/Solr/Apache_Solr_Service_Balancer.html' target='right'>Apache_Solr_Service_Balancer</a></dd>
|
||||
<dt class="folder-title">Files</dt>
|
||||
<dd><a href='Apache/Solr/_HttpTransport---Abstract.php.html' target='right'>Abstract.php</a></dd>
|
||||
<dd><a href='Apache/Solr/_Service---Balancer.php.html' target='right'>Balancer.php</a></dd>
|
||||
<dd><a href='Apache/Solr/_HttpTransport---Curl.php.html' target='right'>Curl.php</a></dd>
|
||||
<dd><a href='Apache/Solr/_HttpTransport---CurlNoReuse.php.html' target='right'>CurlNoReuse.php</a></dd>
|
||||
<dd><a href='Apache/Solr/_Document.php.html' target='right'>Document.php</a></dd>
|
||||
<dd><a href='Apache/Solr/_Exception.php.html' target='right'>Exception.php</a></dd>
|
||||
<dd><a href='Apache/Solr/_HttpTransport---FileGetContents.php.html' target='right'>FileGetContents.php</a></dd>
|
||||
<dd><a href='Apache/Solr/_HttpTransportException.php.html' target='right'>HttpTransportException.php</a></dd>
|
||||
<dd><a href='Apache/Solr/_HttpTransport---Interface.php.html' target='right'>Interface.php</a></dd>
|
||||
<dd><a href='Apache/Solr/_InvalidArgumentException.php.html' target='right'>InvalidArgumentException.php</a></dd>
|
||||
<dd><a href='Apache/Solr/_NoServiceAvailableException.php.html' target='right'>NoServiceAvailableException.php</a></dd>
|
||||
<dd><a href='Apache/Solr/_ParserException.php.html' target='right'>ParserException.php</a></dd>
|
||||
<dd><a href='Apache/Solr/_Response.php.html' target='right'>Response.php</a></dd>
|
||||
<dd><a href='Apache/Solr/_HttpTransport---Response.php.html' target='right'>Response.php</a></dd>
|
||||
<dd><a href='Apache/Solr/_Service.php.html' target='right'>Service.php</a></dd>
|
||||
</dl>
|
||||
</dd>
|
||||
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<p class="notes"><a href="http://www.phpdoc.org" target="_blank">phpDocumentor v <span class="field">1.4.3</span></a></p>
|
||||
</BODY>
|
||||
</HTML>
|
||||
32
SolrPhpClient/phpdocs/media/banner.css
Normal file
32
SolrPhpClient/phpdocs/media/banner.css
Normal file
@@ -0,0 +1,32 @@
|
||||
body
|
||||
{
|
||||
background-color: #DDDDDD;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
/* Banner (top bar) classes */
|
||||
|
||||
.banner { }
|
||||
|
||||
.banner-menu
|
||||
{
|
||||
clear: both;
|
||||
padding: .5em;
|
||||
border-top: 2px solid #999999;
|
||||
}
|
||||
|
||||
.banner-title
|
||||
{
|
||||
text-align: right;
|
||||
font-size: 20pt;
|
||||
font-weight: bold;
|
||||
margin: .2em;
|
||||
}
|
||||
|
||||
.package-selector
|
||||
{
|
||||
background-color: #CCCCCC;
|
||||
border: 1px solid black;
|
||||
color: blue;
|
||||
}
|
||||
142
SolrPhpClient/phpdocs/media/stylesheet.css
Normal file
142
SolrPhpClient/phpdocs/media/stylesheet.css
Normal file
@@ -0,0 +1,142 @@
|
||||
a { color: #0000FF; text-decoration: none; }
|
||||
a:hover { color: #FF0000; text-decoration: underline; }
|
||||
a:active { color: #FF0000; text-decoration: underline; }
|
||||
|
||||
body { background-color: #EEEEEE; font-family: Verdana, Arial, sans-serif }
|
||||
body, table { font-size: 10pt }
|
||||
a img { border: 0px; }
|
||||
dd { margin-left: 0px; padding-left: 1em; }
|
||||
|
||||
/* Page layout/boxes */
|
||||
|
||||
.info-box {}
|
||||
.info-box-title { margin: 1em 0em 0em 0em; padding: .25em; font-weight: normal; font-size: 14pt; border: 2px solid #999999; background-color: #DDDDDD }
|
||||
.info-box-body { border: 1px solid #999999; padding: .5em; background-color: #F8F8F8; }
|
||||
.nav-bar { font-size: 8pt; white-space: nowrap; text-align: right; padding: .2em; margin: 0em 0em 1em 0em; }
|
||||
|
||||
.oddrow { background-color: #DDDDDD; border: 1px solid #999999; padding: .5em; margin-bottom: 1em}
|
||||
.evenrow { background-color: #DDDDDD; border: 1px solid #999999; padding: .5em; margin-bottom: 1em}
|
||||
|
||||
.page-body { max-width: 800px; margin: auto; }
|
||||
.tree dl { margin: 0px }
|
||||
|
||||
/* Index formatting classes */
|
||||
|
||||
.index-item-body { margin-top: .5em; margin-bottom: .5em}
|
||||
.index-item-description { margin-top: .25em }
|
||||
.index-item-details { font-weight: normal; font-style: italic; font-size: 8pt }
|
||||
.index-letter-section { background-color: #EEEEEE; border: 1px dotted #999999; padding: .5em; margin-bottom: 1em}
|
||||
.index-letter-title { font-size: 12pt; font-weight: bold }
|
||||
.index-letter-menu { text-align: center; margin: 1em }
|
||||
.index-letter { font-size: 12pt }
|
||||
|
||||
/* Docbook classes */
|
||||
|
||||
.description {}
|
||||
.short-description { font-weight: bold; color: #666666; }
|
||||
.tags { padding-left: 0em; margin-left: 3em; color: #666666; list-style-type: square; }
|
||||
.parameters { padding-left: 0em; margin-left: 3em; font-style: italic; list-style-type: square; }
|
||||
.redefinitions { font-size: 8pt; padding-left: 0em; margin-left: 2em; }
|
||||
.package { }
|
||||
.package-title { font-weight: bold; font-size: 14pt; border-bottom: 1px solid black }
|
||||
.package-details { font-size: 85%; }
|
||||
.sub-package { font-weight: bold; font-size: 120% }
|
||||
.tutorial { border-width: thin; border-color: #0066ff }
|
||||
.tutorial-nav-box { width: 100%; border: 2px solid #999999; background-color: #DDDDDD }
|
||||
.nav-button-disabled { color: #999999; }
|
||||
.nav-button:active,
|
||||
.nav-button:focus,
|
||||
.nav-button:hover { background-color: #AAAAAA; outline: 1px solid #666666; text-decoration: none }
|
||||
.folder-title { font-style: italic }
|
||||
|
||||
/* Generic formatting */
|
||||
|
||||
.field { font-weight: bold; }
|
||||
.detail { font-size: 8pt; }
|
||||
.notes { font-style: italic; font-size: 8pt; }
|
||||
.separator { background-color: #999999; height: 2px; }
|
||||
.warning { color: #FF6600; }
|
||||
.disabled { font-style: italic; color: #999999; }
|
||||
|
||||
/* Code elements */
|
||||
|
||||
.line-number { }
|
||||
|
||||
.class-table { width: 100%; }
|
||||
.class-table-header { border-bottom: 1px dotted #666666; text-align: left}
|
||||
.class-name { color: #000000; font-weight: bold; }
|
||||
|
||||
.method-summary { padding-left: 1em; font-size: 8pt }
|
||||
.method-header { }
|
||||
.method-definition { margin-bottom: .3em }
|
||||
.method-title { font-weight: bold; }
|
||||
.method-name { font-weight: bold; }
|
||||
.method-signature { font-size: 85%; color: #0066BB; margin: .5em 0em }
|
||||
.method-result { font-style: italic; }
|
||||
|
||||
.var-summary { padding-left: 1em; font-size: 8pt; }
|
||||
.var-header { }
|
||||
.var-title { margin-bottom: .3em }
|
||||
.var-type { color: red; font-weight: bold }
|
||||
.var-name { font-weight: bold; }
|
||||
.var-default {}
|
||||
.var-description { font-weight: normal; color: #000000; }
|
||||
|
||||
.include-title { }
|
||||
.include-type { font-style: italic; }
|
||||
.include-name { font-weight: bold; }
|
||||
|
||||
.const-title { }
|
||||
.const-name { font-weight: bold; }
|
||||
|
||||
/* Syntax highlighting */
|
||||
|
||||
.src-code { border: 1px solid #336699; padding: 1em; background-color: #EEEEEE;
|
||||
font-family: 'Courier New', Courier, monospace; font-weight: normal; }
|
||||
.src-line { font-family: 'Courier New', Courier, monospace; font-weight: normal; }
|
||||
|
||||
.src-comm { color: #666666; }
|
||||
.src-id { }
|
||||
.src-inc { color: #0000FF; }
|
||||
.src-key { color: #0000FF; }
|
||||
.src-num { color: #CC0000; }
|
||||
.src-str { color: #66cccc; }
|
||||
.src-sym { font-weight: bold; }
|
||||
.src-var { }
|
||||
|
||||
.src-php { font-weight: bold; }
|
||||
|
||||
.src-doc { color: #009999 }
|
||||
.src-doc-close-template { color: #0000FF }
|
||||
.src-doc-coretag { color: #0099FF; font-weight: bold }
|
||||
.src-doc-inlinetag { color: #0099FF }
|
||||
.src-doc-internal { color: #6699cc }
|
||||
.src-doc-tag { color: #0080CC }
|
||||
.src-doc-template { color: #0000FF }
|
||||
.src-doc-type { font-style: italic }
|
||||
.src-doc-var { font-style: italic }
|
||||
|
||||
.tute-tag { color: #009999 }
|
||||
.tute-attribute-name { color: #0000FF }
|
||||
.tute-attribute-value { color: #0099FF }
|
||||
.tute-entity { font-weight: bold; }
|
||||
.tute-comment { font-style: italic }
|
||||
.tute-inline-tag { color: #636311; font-weight: bold }
|
||||
|
||||
/* tutorial */
|
||||
|
||||
.authors { }
|
||||
.author { font-style: italic; font-weight: bold }
|
||||
.author-blurb { margin: .5em 0em .5em 2em; font-size: 85%; font-weight: normal; font-style: normal }
|
||||
.example { background-color: #DDDDDD; border: 1px solid #999999; padding: .5em; }
|
||||
.listing { background-color: #DDDDDD; border: 1px solid #999999; padding: .5em; white-space: nowrap; }
|
||||
.release-info { font-size: 85%; font-style: italic; margin: 1em 0em }
|
||||
.ref-title-box { }
|
||||
.ref-title { }
|
||||
.ref-purpose { font-style: italic; color: #666666 }
|
||||
.ref-synopsis { }
|
||||
.title { font-weight: bold; border-bottom: 1px solid #888888; color: #888888; }
|
||||
.cmd-synopsis { margin: 1em 0em }
|
||||
.cmd-title { font-weight: bold }
|
||||
.toc { margin-left: 2em; padding-left: 0em }
|
||||
|
||||
29
SolrPhpClient/phpdocs/packages.html
Normal file
29
SolrPhpClient/phpdocs/packages.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title></title>
|
||||
<link rel="stylesheet" href="media/stylesheet.css" />
|
||||
<link rel="stylesheet" href="media/banner.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="banner">
|
||||
<div class="banner-title">Apache</div>
|
||||
<div class="banner-menu">
|
||||
<form>
|
||||
<table cellpadding="0" cellspacing="0" style="width: 100%">
|
||||
<tr>
|
||||
<td>
|
||||
</td>
|
||||
<td style="width: 2em"> </td>
|
||||
<td style="text-align: right">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
29
SolrPhpClient/phpdocs/todolist.html
Normal file
29
SolrPhpClient/phpdocs/todolist.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Todo List</title>
|
||||
<link rel="stylesheet" href="media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div align="center"><h1>Todo List</h1></div>
|
||||
<h2>Apache</h2>
|
||||
<h3><a href="Apache/Solr/Apache_Solr_Service.html">Apache_Solr_Service</a></h3>
|
||||
<ul>
|
||||
<li>Investigate using other HTTP clients other than file_get_contents built-in handler. Could provide performance improvements when dealing with multiple requests by using HTTP's keep alive functionality</li>
|
||||
</ul>
|
||||
<h3><a href="Apache/Solr/Apache_Solr_Service.html#methodextractFromString">Apache_Solr_Service::extractFromString()</a></h3>
|
||||
<ul>
|
||||
<li>Should be using multipart/form-data to post parameter values, but I could not get my implementation to work. Needs revisisted.</li>
|
||||
</ul>
|
||||
<h3><a href="Apache/Solr/Apache_Solr_Service_Balancer.html#methodextractFromString">Apache_Solr_Service_Balancer::extractFromString()</a></h3>
|
||||
<ul>
|
||||
<li>Should be using multipart/form-data to post parameter values, but I could not get my implementation to work. Needs revisisted.</li>
|
||||
</ul>
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Wed, 04 May 2011 11:01:19 -0400 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
439
SolrPhpClient/tests/Apache/Solr/DocumentTest.php
Normal file
439
SolrPhpClient/tests/Apache/Solr/DocumentTest.php
Normal file
@@ -0,0 +1,439 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* - Neither the name of Servigistics, Inc. nor the names of
|
||||
* its contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @copyright Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)
|
||||
* @license http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD
|
||||
*
|
||||
* @package Apache
|
||||
* @subpackage Solr
|
||||
* @author Donovan Jimenez <djimenez@conduit-it.com>
|
||||
*/
|
||||
|
||||
/**
|
||||
* Apache_Solr_Document Unit Test
|
||||
*/
|
||||
class Apache_Solr_DocumentTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* Fixture used for testing
|
||||
*
|
||||
* @var Apache_Solr_Document
|
||||
*/
|
||||
private $_fixture;
|
||||
|
||||
/**
|
||||
* Setup for the fixture before each unit test - part of test case API
|
||||
*/
|
||||
protected function setup()
|
||||
{
|
||||
$this->_fixture = new Apache_Solr_Document();
|
||||
}
|
||||
|
||||
/**
|
||||
* Teardown after each unit test - part of test case API
|
||||
*/
|
||||
protected function tearDown()
|
||||
{
|
||||
unset($this->_fixture);
|
||||
}
|
||||
|
||||
public function testDefaultStateAfterConstructor()
|
||||
{
|
||||
// document boost should be false
|
||||
$this->assertFalse($this->_fixture->getBoost());
|
||||
|
||||
// document fields should be empty
|
||||
$this->assertEquals(0, count($this->_fixture->getFieldNames()));
|
||||
$this->assertEquals(0, count($this->_fixture->getFieldValues()));
|
||||
$this->assertEquals(0, count($this->_fixture->getFieldBoosts()));
|
||||
|
||||
// document iterator should be empty
|
||||
$this->assertEquals(0, iterator_count($this->_fixture));
|
||||
}
|
||||
|
||||
public function testSetAndGetField()
|
||||
{
|
||||
$field = 'field';
|
||||
$value = 'value';
|
||||
$boost = 0.5;
|
||||
|
||||
// set the field
|
||||
$this->_fixture->setField($field, $value, $boost);
|
||||
|
||||
$result = $this->_fixture->getField($field);
|
||||
|
||||
// check the array values
|
||||
$this->assertTrue(is_array($result));
|
||||
$this->assertEquals($field, $result['name']);
|
||||
$this->assertEquals($value, $result['value']);
|
||||
$this->assertEquals($boost, $result['boost']);
|
||||
}
|
||||
|
||||
public function testGetFieldReturnsFalseForNonExistentField()
|
||||
{
|
||||
$this->assertFalse($this->_fixture->getField('field'));
|
||||
}
|
||||
|
||||
public function testMagicGetForFieldValues()
|
||||
{
|
||||
$field = 'field';
|
||||
$value = 'value';
|
||||
|
||||
$this->_fixture->setField($field, $value);
|
||||
|
||||
// test the __get value
|
||||
$this->assertEquals($value, $this->_fixture->{$field});
|
||||
}
|
||||
|
||||
/**
|
||||
* Added for issue #48 (http://code.google.com/p/solr-php-client/issues/detail?id=48)
|
||||
*/
|
||||
public function testMagicGetReturnsNullForNonExistentField()
|
||||
{
|
||||
$this->assertNull($this->_fixture->nonExistent);
|
||||
}
|
||||
|
||||
public function testMagicSetForFieldValues()
|
||||
{
|
||||
$field = 'field';
|
||||
$value = 'value';
|
||||
|
||||
// set field value with magic __set
|
||||
$this->_fixture->{$field} = $value;
|
||||
|
||||
$fieldArray = $this->_fixture->getField($field);
|
||||
|
||||
// set values
|
||||
$this->assertEquals($field, $fieldArray['name']);
|
||||
$this->assertEquals($value, $fieldArray['value']);
|
||||
$this->assertTrue($fieldArray['boost'] === false);
|
||||
}
|
||||
|
||||
public function testMagicIssetForNonExistentField()
|
||||
{
|
||||
$this->assertFalse(isset($this->_fixture->field));
|
||||
}
|
||||
|
||||
public function testMagicIssetForExistingField()
|
||||
{
|
||||
$field = 'field';
|
||||
$this->_fixture->{$field} = 'value';
|
||||
$this->assertTrue(isset($this->_fixture->{$field}));
|
||||
}
|
||||
|
||||
public function testMagicUnsetForExistingField()
|
||||
{
|
||||
$field = 'field';
|
||||
|
||||
$this->_fixture->{$field} = 'value';
|
||||
|
||||
// now unset the field
|
||||
unset($this->_fixture->{$field});
|
||||
|
||||
// now test that its unset
|
||||
$this->assertFalse(isset($this->_fixture->{$field}));
|
||||
}
|
||||
|
||||
public function testMagicUnsetForNonExistingField()
|
||||
{
|
||||
$field = 'field';
|
||||
unset($this->_fixture->{$field});
|
||||
|
||||
// now test that it still does not exist
|
||||
$this->assertFalse(isset($this->_fixture->{$field}));
|
||||
}
|
||||
|
||||
public function testSetAndGetFieldBoostWithPositiveNumberSetsBoost()
|
||||
{
|
||||
$field = 'field';
|
||||
$boost = 0.5;
|
||||
|
||||
$this->_fixture->setFieldBoost($field, $boost);
|
||||
|
||||
// test the field boost
|
||||
$this->assertEquals($boost, $this->_fixture->getFieldBoost($field));
|
||||
}
|
||||
|
||||
public function testSetAndGetFieldBoostWithZeroRemovesBoost()
|
||||
{
|
||||
$field = 'field';
|
||||
$boost = 0;
|
||||
|
||||
$this->_fixture->setFieldBoost($field, $boost);
|
||||
|
||||
// test the field boost
|
||||
$this->assertTrue($this->_fixture->getFieldBoost($field) === false);
|
||||
}
|
||||
|
||||
public function testSetAndGetFieldBoostWithNegativeNumberRemovesBoost()
|
||||
{
|
||||
$field = 'field';
|
||||
$boost = -1;
|
||||
|
||||
$this->_fixture->setFieldBoost($field, $boost);
|
||||
|
||||
// test the field boost
|
||||
$this->assertTrue($this->_fixture->getFieldBoost($field) === false);
|
||||
}
|
||||
|
||||
public function testSetAndGetFieldBoostWithNonNumberRemovesBoost()
|
||||
{
|
||||
$field = 'field';
|
||||
$boost = "i am not a number";
|
||||
|
||||
$this->_fixture->setFieldBoost($field, $boost);
|
||||
|
||||
// test the field boost
|
||||
$this->assertTrue($this->_fixture->getFieldBoost($field) === false);
|
||||
}
|
||||
|
||||
public function testSetAndGetBoostWithPositiveNumberSetsBoost()
|
||||
{
|
||||
$boost = 0.5;
|
||||
$this->_fixture->setBoost($boost);
|
||||
|
||||
// the boost should now be set
|
||||
$this->assertEquals($boost, $this->_fixture->getBoost());
|
||||
}
|
||||
|
||||
public function testSetAndGetBoostWithZeroRemovesBoost()
|
||||
{
|
||||
$this->_fixture->setBoost(0);
|
||||
|
||||
// should be boolean false
|
||||
$this->assertTrue($this->_fixture->getBoost() === false);
|
||||
}
|
||||
|
||||
public function testSetAndGetBoostWithNegativeNumberRemovesBoost()
|
||||
{
|
||||
$this->_fixture->setBoost(-1);
|
||||
|
||||
// should be boolean false
|
||||
$this->assertTrue($this->_fixture->getBoost() === false);
|
||||
}
|
||||
|
||||
public function testSetAndGetBoostWithNonNumberRemovesBoost()
|
||||
{
|
||||
$this->_fixture->setBoost("i am not a number");
|
||||
|
||||
// should be boolean false
|
||||
$this->assertTrue($this->_fixture->getBoost() === false);
|
||||
}
|
||||
|
||||
public function testAddFieldCreatesMultiValueWhenFieldDoesNotExist()
|
||||
{
|
||||
$field = 'field';
|
||||
$value = 'value';
|
||||
|
||||
$this->_fixture->addField($field, $value);
|
||||
|
||||
// check that value is an array with correct values
|
||||
$fieldValue = $this->_fixture->{$field};
|
||||
|
||||
$this->assertTrue(is_array($fieldValue));
|
||||
$this->assertEquals(1, count($fieldValue));
|
||||
$this->assertEquals($value, $fieldValue[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
* setMultiValue has been deprecated and defers to addField
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
public function testSetMultiValueCreateMultiValueWhenFieldDoesNotExist()
|
||||
{
|
||||
$field = 'field';
|
||||
$value = 'value';
|
||||
|
||||
$this->_fixture->setMultiValue($field, $value);
|
||||
|
||||
// check that value is an array with correct values
|
||||
$fieldValue = $this->_fixture->{$field};
|
||||
|
||||
$this->assertTrue(is_array($fieldValue));
|
||||
$this->assertEquals(1, count($fieldValue));
|
||||
$this->assertEquals($value, $fieldValue[0]);
|
||||
}
|
||||
|
||||
public function testAddFieldCreatesMultiValueWhenFieldDoesExistAsSingleValue()
|
||||
{
|
||||
$field = 'field';
|
||||
$value1 = 'value1';
|
||||
$value2 = 'value2';
|
||||
|
||||
// set first value as singular value
|
||||
$this->_fixture->{$field} = $value1;
|
||||
|
||||
// add a second value with addField
|
||||
$this->_fixture->addField($field, $value2);
|
||||
|
||||
// check that value is an array with correct values
|
||||
$fieldValue = $this->_fixture->{$field};
|
||||
|
||||
$this->assertTrue(is_array($fieldValue));
|
||||
$this->assertEquals(2, count($fieldValue));
|
||||
$this->assertEquals($value1, $fieldValue[0]);
|
||||
$this->assertEquals($value2, $fieldValue[1]);
|
||||
}
|
||||
|
||||
/**
|
||||
* setMultiValue has been deprecated and defers to addField
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
public function testSetMultiValueCreatesMultiValueWhenFieldDoesExistAsSingleValue()
|
||||
{
|
||||
$field = 'field';
|
||||
$value1 = 'value1';
|
||||
$value2 = 'value2';
|
||||
|
||||
// set first value as singular value
|
||||
$this->_fixture->{$field} = $value1;
|
||||
|
||||
// add a second value with addField
|
||||
$this->_fixture->setMultiValue($field, $value2);
|
||||
|
||||
// check that value is an array with correct values
|
||||
$fieldValue = $this->_fixture->{$field};
|
||||
|
||||
$this->assertTrue(is_array($fieldValue));
|
||||
$this->assertEquals(2, count($fieldValue));
|
||||
$this->assertEquals($value1, $fieldValue[0]);
|
||||
$this->assertEquals($value2, $fieldValue[1]);
|
||||
}
|
||||
|
||||
public function testAddFieldWithBoostSetsFieldBoost()
|
||||
{
|
||||
$field = 'field';
|
||||
$boost = 0.5;
|
||||
|
||||
$this->_fixture->addField($field, 'value', $boost);
|
||||
|
||||
// check the field boost
|
||||
$this->assertEquals($boost, $this->_fixture->getFieldBoost($field));
|
||||
}
|
||||
|
||||
public function testAddFieldWithBoostMultipliesWithAPreexistingBoost()
|
||||
{
|
||||
$field = 'field';
|
||||
$boost = 0.5;
|
||||
|
||||
// set a field with a boost
|
||||
$this->_fixture->setField($field, 'value1', $boost);
|
||||
|
||||
// now add another value with the same boost
|
||||
$this->_fixture->addField($field, 'value2', $boost);
|
||||
|
||||
// new boost should be $boost * $boost
|
||||
$this->assertEquals($boost * $boost, $this->_fixture->getFieldBoost($field));
|
||||
}
|
||||
|
||||
public function testGetFieldNamesIsInitiallyEmpty()
|
||||
{
|
||||
$fieldNames = $this->_fixture->getFieldNames();
|
||||
|
||||
$this->assertTrue(empty($fieldNames));
|
||||
}
|
||||
|
||||
public function testGetFieldNamesAfterFieldIsSetIsNotEmpty()
|
||||
{
|
||||
$field = 'field';
|
||||
|
||||
$this->_fixture->{$field} = 'value';
|
||||
$fieldNames = $this->_fixture->getFieldNames();
|
||||
|
||||
$this->assertTrue(!empty($fieldNames));
|
||||
$this->assertEquals(1, count($fieldNames));
|
||||
$this->assertEquals($field, $fieldNames[0]);
|
||||
}
|
||||
|
||||
public function testGetFieldValuesIsInitiallyEmpty()
|
||||
{
|
||||
$fieldValues = $this->_fixture->getFieldValues();
|
||||
|
||||
$this->assertTrue(empty($fieldValues));
|
||||
}
|
||||
|
||||
public function testGetFieldValuessAfterFieldIsSetIsNotEmpty()
|
||||
{
|
||||
$value = 'value';
|
||||
|
||||
$this->_fixture->field = $value;
|
||||
$fieldValues = $this->_fixture->getFieldValues();
|
||||
|
||||
$this->assertTrue(!empty($fieldValues));
|
||||
$this->assertEquals(1, count($fieldValues));
|
||||
$this->assertEquals($value, $fieldValues[0]);
|
||||
}
|
||||
|
||||
public function testGetIteratorAfterFieldValueIsSet()
|
||||
{
|
||||
$field = 'field';
|
||||
$value = 'value';
|
||||
|
||||
$this->_fixture->{$field} = $value;
|
||||
|
||||
$itemCount = 0;
|
||||
|
||||
foreach ($this->_fixture as $iteratedField => $iteratedValue)
|
||||
{
|
||||
++$itemCount;
|
||||
|
||||
// test field and value
|
||||
$this->assertEquals($field, $iteratedField);
|
||||
$this->assertEquals($value, $iteratedValue);
|
||||
}
|
||||
|
||||
// test number of iterations is 1
|
||||
$this->assertEquals(1, $itemCount);
|
||||
}
|
||||
|
||||
public function testClearReturnsDocumentToDefaultState()
|
||||
{
|
||||
// set the document boost
|
||||
$this->_fixture->setBoost(0.5);
|
||||
|
||||
// set a field
|
||||
$this->_fixture->someField = "some value";
|
||||
|
||||
// clear the document to remove boost and fields
|
||||
$this->_fixture->clear();
|
||||
|
||||
// document boost should now be false
|
||||
$this->assertFalse($this->_fixture->getBoost());
|
||||
|
||||
// document fields should now be empty
|
||||
$this->assertEquals(0, count($this->_fixture->getFieldNames()));
|
||||
$this->assertEquals(0, count($this->_fixture->getFieldValues()));
|
||||
$this->assertEquals(0, count($this->_fixture->getFieldBoosts()));
|
||||
|
||||
// document iterator should now be empty
|
||||
$this->assertEquals(0, iterator_count($this->_fixture));
|
||||
}
|
||||
}
|
||||
208
SolrPhpClient/tests/Apache/Solr/HttpTransport/AbstractTest.php
Normal file
208
SolrPhpClient/tests/Apache/Solr/HttpTransport/AbstractTest.php
Normal file
@@ -0,0 +1,208 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* - Neither the name of Servigistics, Inc. nor the names of
|
||||
* its contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @copyright Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)
|
||||
* @license http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD
|
||||
*
|
||||
* @package Apache
|
||||
* @subpackage Solr
|
||||
* @author Donovan Jimenez <djimenez@conduit-it.com>
|
||||
*/
|
||||
|
||||
/**
|
||||
* Apache_Solr_HttpTransport_Abstract Unit Tests
|
||||
*/
|
||||
abstract class Apache_Solr_HttpTransport_AbstractTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
const TIMEOUT = 2;
|
||||
|
||||
// request our copyright file from googlecode for GET and HEAD
|
||||
const GET_URL = "http://solr-php-client.googlecode.com/svn/trunk/COPYING";
|
||||
const GET_RESPONSE_MIME_TYPE = 'text/plain';
|
||||
const GET_RESPONSE_ENCODING = 'UTF-8';
|
||||
const GET_RESPONSE_MATCH = 'Copyright (c) ';
|
||||
|
||||
// post to the issue list page with a search for 'meh'
|
||||
const POST_URL = "http://code.google.com/p/solr-php-client/issues/list";
|
||||
const POST_DATA = "can=2&q=meh&colspec=ID+Type+Status+Priority+Milestone+Owner+Summary&cells=tiles";
|
||||
const POST_REQUEST_CONTENT_TYPE = 'application/x-www-form-urlencoded; charset=UTF-8';
|
||||
|
||||
const POST_RESPONSE_MIME_TYPE = 'text/html';
|
||||
const POST_RESPONSE_ENCODING = 'UTF-8';
|
||||
//const POST_RESPONSE_MATCH = 'not sure';
|
||||
|
||||
abstract public function getFixture();
|
||||
|
||||
public function testGetDefaultTimeoutWithDefaultConstructor()
|
||||
{
|
||||
$fixture = $this->getFixture();
|
||||
$timeout = $fixture->getDefaultTimeout();
|
||||
|
||||
$this->assertGreaterThan(0, $timeout);
|
||||
}
|
||||
|
||||
public function testGetDefaultTimeoutSetToSixtyForBadValues()
|
||||
{
|
||||
// first set our default_socket_timeout ini setting
|
||||
$previousValue = ini_get('default_socket_timeout');
|
||||
ini_set('default_socket_timeout', 0);
|
||||
|
||||
$fixture = $this->getFixture();
|
||||
$timeout = $fixture->getDefaultTimeout();
|
||||
|
||||
// reset timeout
|
||||
ini_set('default_socket_timeout', $previousValue);
|
||||
|
||||
$this->assertEquals(60, $timeout);
|
||||
}
|
||||
|
||||
public function testSetDefaultTimeout()
|
||||
{
|
||||
$newTimeout = 1234;
|
||||
|
||||
$fixture = $this->getFixture();
|
||||
$fixture->setDefaultTimeout($newTimeout);
|
||||
$timeout = $fixture->getDefaultTimeout();
|
||||
|
||||
$this->assertEquals($newTimeout, $timeout);
|
||||
}
|
||||
|
||||
public function testPerformGetRequest()
|
||||
{
|
||||
$fixture = $this->getFixture();
|
||||
$fixture->setDefaultTimeout(self::TIMEOUT);
|
||||
|
||||
$response = $fixture->performGetRequest(self::GET_URL);
|
||||
|
||||
$this->assertType('Apache_Solr_HttpTransport_Response', $response);
|
||||
|
||||
$this->assertEquals(200, $response->getStatusCode(), 'Status code was not 200');
|
||||
$this->assertEquals(self::GET_RESPONSE_MIME_TYPE, $response->getMimeType(), 'mimetype was not correct');
|
||||
$this->assertEquals(self::GET_RESPONSE_ENCODING, $response->getEncoding(), 'character encoding was not correct');
|
||||
$this->assertStringStartsWith(self::GET_RESPONSE_MATCH, $response->getBody(), 'body did not start with match text');
|
||||
}
|
||||
|
||||
public function testPerformGetRequestWithTimeout()
|
||||
{
|
||||
$fixture = $this->getFixture();
|
||||
$response = $fixture->performGetRequest(self::GET_URL, self::TIMEOUT);
|
||||
|
||||
$this->assertType('Apache_Solr_HttpTransport_Response', $response);
|
||||
|
||||
$this->assertEquals(200, $response->getStatusCode(), 'Status code was not 200');
|
||||
$this->assertEquals(self::GET_RESPONSE_MIME_TYPE, $response->getMimeType(), 'mimetype was not correct');
|
||||
$this->assertEquals(self::GET_RESPONSE_ENCODING, $response->getEncoding(), 'character encoding was not correct');
|
||||
$this->assertStringStartsWith(self::GET_RESPONSE_MATCH, $response->getBody(), 'body did not start with match text');
|
||||
}
|
||||
|
||||
public function testPerformHeadRequest()
|
||||
{
|
||||
$fixture = $this->getFixture();
|
||||
$fixture->setDefaultTimeout(self::TIMEOUT);
|
||||
|
||||
$response = $fixture->performHeadRequest(self::GET_URL);
|
||||
|
||||
// we should get everything the same as a get, except the body
|
||||
$this->assertType('Apache_Solr_HttpTransport_Response', $response);
|
||||
|
||||
$this->assertEquals(200, $response->getStatusCode(), 'Status code was not 200');
|
||||
$this->assertEquals(self::GET_RESPONSE_MIME_TYPE, $response->getMimeType(), 'mimetype was not correct');
|
||||
$this->assertEquals(self::GET_RESPONSE_ENCODING, $response->getEncoding(), 'character encoding was not correct');
|
||||
$this->assertEquals("", $response->getBody(), 'body was not empty');
|
||||
}
|
||||
|
||||
public function testPerformHeadRequestWithTimeout()
|
||||
{
|
||||
$fixture = $this->getFixture();
|
||||
$response = $fixture->performHeadRequest(self::GET_URL, self::TIMEOUT);
|
||||
|
||||
// we should get everything the same as a get, except the body
|
||||
$this->assertType('Apache_Solr_HttpTransport_Response', $response);
|
||||
|
||||
$this->assertEquals(200, $response->getStatusCode(), 'Status code was not 200');
|
||||
$this->assertEquals(self::GET_RESPONSE_MIME_TYPE, $response->getMimeType(), 'mimetype was not correct');
|
||||
$this->assertEquals(self::GET_RESPONSE_ENCODING, $response->getEncoding(), 'character encoding was not correct');
|
||||
$this->assertEquals("", $response->getBody(), 'body was not empty');
|
||||
}
|
||||
|
||||
public function testPerformPostRequest()
|
||||
{
|
||||
$fixture = $this->getFixture();
|
||||
$fixture->setDefaultTimeout(self::TIMEOUT);
|
||||
|
||||
$response = $fixture->performPostRequest(self::POST_URL, self::POST_DATA, self::POST_REQUEST_CONTENT_TYPE);
|
||||
|
||||
$this->assertType('Apache_Solr_HttpTransport_Response', $response);
|
||||
|
||||
$this->assertEquals(200, $response->getStatusCode(), 'Status code was not 200');
|
||||
$this->assertEquals(self::POST_RESPONSE_MIME_TYPE, $response->getMimeType(), 'mimetype was not correct');
|
||||
$this->assertEquals(self::POST_RESPONSE_ENCODING, $response->getEncoding(), 'character encoding was not correct');
|
||||
//$this->assertStringStartsWith(self::POST_RESPONSE_MATCH, $response->getBody(), 'body did not start with match text');
|
||||
}
|
||||
|
||||
public function testPerformPostRequestWithTimeout()
|
||||
{
|
||||
$fixture = $this->getFixture();
|
||||
$response = $fixture->performPostRequest(self::POST_URL, self::POST_DATA, self::POST_REQUEST_CONTENT_TYPE, self::TIMEOUT);
|
||||
|
||||
$this->assertType('Apache_Solr_HttpTransport_Response', $response);
|
||||
|
||||
$this->assertEquals(200, $response->getStatusCode(), 'Status code was not 200');
|
||||
$this->assertEquals(self::POST_RESPONSE_MIME_TYPE, $response->getMimeType(), 'mimetype was not correct');
|
||||
$this->assertEquals(self::POST_RESPONSE_ENCODING, $response->getEncoding(), 'character encoding was not correct');
|
||||
//$this->assertStringStartsWith(self::POST_RESPONSE_MATCH, $response->getBody(), 'body did not start with match text');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test one session doing multiple requests in multiple orders
|
||||
*/
|
||||
public function testMultipleRequests()
|
||||
{
|
||||
// initial get request
|
||||
$this->testPerformGetRequest();
|
||||
|
||||
// head following get
|
||||
$this->testPerformHeadRequest();
|
||||
|
||||
// post following head
|
||||
$this->testPerformPostRequest();
|
||||
|
||||
// get following post
|
||||
$this->testPerformGetRequest();
|
||||
|
||||
// post following get
|
||||
$this->testPerformPostRequest();
|
||||
|
||||
// head following post
|
||||
$this->testPerformHeadRequest();
|
||||
|
||||
// get following post
|
||||
$this->testPerformGetRequest();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* - Neither the name of Servigistics, Inc. nor the names of
|
||||
* its contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @copyright Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)
|
||||
* @license http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD
|
||||
*
|
||||
* @package Apache
|
||||
* @subpackage Solr
|
||||
* @author Donovan Jimenez <djimenez@conduit-it.com>
|
||||
*/
|
||||
|
||||
/**
|
||||
* Apache_Solr_HttpTransport_CurlNoReuse Unit Tests
|
||||
*/
|
||||
class Apache_Solr_HttpTransport_CurlNoReuseTest extends Apache_Solr_HttpTransport_AbstractTest
|
||||
{
|
||||
public function getFixture()
|
||||
{
|
||||
// ensure curl is enabled
|
||||
if (!extension_loaded('curl'))
|
||||
{
|
||||
$this->markTestSkipped("curl module is not enabled");
|
||||
}
|
||||
|
||||
return new Apache_Solr_HttpTransport_CurlNoReuse();
|
||||
}
|
||||
}
|
||||
53
SolrPhpClient/tests/Apache/Solr/HttpTransport/CurlTest.php
Normal file
53
SolrPhpClient/tests/Apache/Solr/HttpTransport/CurlTest.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* - Neither the name of Servigistics, Inc. nor the names of
|
||||
* its contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @copyright Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)
|
||||
* @license http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD
|
||||
*
|
||||
* @package Apache
|
||||
* @subpackage Solr
|
||||
* @author Donovan Jimenez <djimenez@conduit-it.com>
|
||||
*/
|
||||
|
||||
/**
|
||||
* Apache_Solr_HttpTransport_Curl Unit Tests
|
||||
*/
|
||||
class Apache_Solr_HttpTransport_CurlTest extends Apache_Solr_HttpTransport_AbstractTest
|
||||
{
|
||||
public function getFixture()
|
||||
{
|
||||
// ensure curl is enabled
|
||||
if (!extension_loaded('curl'))
|
||||
{
|
||||
$this->markTestSkipped("curl module is not enabled");
|
||||
}
|
||||
|
||||
return new Apache_Solr_HttpTransport_Curl();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* - Neither the name of Servigistics, Inc. nor the names of
|
||||
* its contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @copyright Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)
|
||||
* @license http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD
|
||||
*
|
||||
* @package Apache
|
||||
* @subpackage Solr
|
||||
* @author Donovan Jimenez <djimenez@conduit-it.com>
|
||||
*/
|
||||
|
||||
/**
|
||||
* Apache_Solr_HttpTransport_FileGetContents Unit Tests
|
||||
*/
|
||||
class Apache_Solr_HttpTransport_FileGetContentsTest extends Apache_Solr_HttpTransport_AbstractTest
|
||||
{
|
||||
public function getFixture()
|
||||
{
|
||||
// make sure allow_url_fopen is on
|
||||
if (!ini_get("allow_url_fopen"))
|
||||
{
|
||||
$this->markTestSkipped("allow_url_fopen is not enabled");
|
||||
}
|
||||
|
||||
return new Apache_Solr_HttpTransport_FileGetContents();
|
||||
}
|
||||
}
|
||||
164
SolrPhpClient/tests/Apache/Solr/HttpTransport/ResponseTest.php
Normal file
164
SolrPhpClient/tests/Apache/Solr/HttpTransport/ResponseTest.php
Normal file
@@ -0,0 +1,164 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* - Neither the name of Servigistics, Inc. nor the names of
|
||||
* its contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @copyright Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)
|
||||
* @license http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD
|
||||
*
|
||||
* @package Apache
|
||||
* @subpackage Solr
|
||||
* @author Donovan Jimenez <djimenez@conduit-it.com>
|
||||
*/
|
||||
|
||||
/**
|
||||
* Apache_Solr_HttpTransport_Response Unit Tests
|
||||
*/
|
||||
class Apache_Solr_HttpTransport_ResponseTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
// generated with the following query string: select?q=solr&wt=json
|
||||
const STATUS_CODE_200 = 200;
|
||||
const STATUS_MESSAGE_200 = "OK";
|
||||
const BODY_200 = '{"responseHeader":{"status":0,"QTime":0,"params":{"q":"solr","wt":"json"}},"response":{"numFound":0,"start":0,"docs":[]}}';
|
||||
const BODY_200_WITH_DOCUMENTS = '{"responseHeader":{"status":0,"QTime":0,"params":{"q":"*:*","wt":"json"}},"response":{"numFound":1,"start":0,"docs":[{"guid":"dev/2/products/45410/1236981","cit_domain":"products","cit_client":"2","cit_instance":"dev","cit_timestamp":"2010-10-06T18:16:51.573Z","product_code_t":["235784"],"product_id":[1236981],"dealer_id":[45410],"category_id":[1030],"manufacturer_id":[0],"vendor_id":[472],"catalog_id":[202]}]}}';
|
||||
const CONTENT_TYPE_200 = "text/plain; charset=utf-8";
|
||||
const MIME_TYPE_200 = "text/plain";
|
||||
const ENCODING_200 = "utf-8";
|
||||
|
||||
// generated with the following query string: select?qt=standad&q=solr&wt=json
|
||||
// NOTE: the intentional mispelling of the standard in the qt parameter
|
||||
const STATUS_CODE_400 = 400;
|
||||
const STATUS_MESSAGE_400 = "Bad Request";
|
||||
const BODY_400 = '<html><head><title>Apache Tomcat/6.0.24 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 400 - unknown handler: standad</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>unknown handler: standad</u></p><p><b>description</b> <u>The request sent by the client was syntactically incorrect (unknown handler: standad).</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.24</h3></body></html>';
|
||||
const CONTENT_TYPE_400 = "text/html; charset=utf-8";
|
||||
const MIME_TYPE_400 = "text/html";
|
||||
const ENCODING_400 = "utf-8";
|
||||
|
||||
// generated with the following query string: select?q=solr&wt=json on a core that does not exist
|
||||
const STATUS_CODE_404 = 404;
|
||||
const STATUS_MESSAGE_404 = "Not Found";
|
||||
const BODY_404 = '<html><head><title>Apache Tomcat/6.0.24 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - /solr/doesnotexist/select</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>/solr/doesnotexist/select</u></p><p><b>description</b> <u>The requested resource (/solr/doesnotexist/select) is not available.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.24</h3></body></html>';
|
||||
const CONTENT_TYPE_404 = "text/html; charset=utf-8";
|
||||
const MIME_TYPE_404 = "text/html";
|
||||
const ENCODING_404 = "utf-8";
|
||||
|
||||
public static function get0Response()
|
||||
{
|
||||
return new Apache_Solr_HttpTransport_Response(null, null, null);
|
||||
}
|
||||
|
||||
public static function get200Response()
|
||||
{
|
||||
return new Apache_Solr_HttpTransport_Response(self::STATUS_CODE_200, self::CONTENT_TYPE_200, self::BODY_200);
|
||||
}
|
||||
|
||||
public static function get200ResponseWithDocuments()
|
||||
{
|
||||
return new Apache_Solr_HttpTransport_Response(self::STATUS_CODE_200, self::CONTENT_TYPE_200, self::BODY_200_WITH_DOCUMENTS);
|
||||
}
|
||||
|
||||
public static function get400Response()
|
||||
{
|
||||
return new Apache_Solr_HttpTransport_Response(self::STATUS_CODE_400, self::CONTENT_TYPE_400, self::BODY_400);
|
||||
}
|
||||
|
||||
public static function get404Response()
|
||||
{
|
||||
return new Apache_Solr_HttpTransport_Response(self::STATUS_CODE_404, self::CONTENT_TYPE_404, self::BODY_404);
|
||||
}
|
||||
|
||||
public function testGetStatusCode()
|
||||
{
|
||||
$fixture = self::get200Response();
|
||||
|
||||
$statusCode = $fixture->getStatusCode();
|
||||
|
||||
$this->assertEquals(self::STATUS_CODE_200, $statusCode);
|
||||
}
|
||||
|
||||
public function testGetStatusMessage()
|
||||
{
|
||||
$fixture = self::get200Response();
|
||||
|
||||
$statusMessage = $fixture->getStatusMessage();
|
||||
|
||||
$this->assertEquals(self::STATUS_MESSAGE_200, $statusMessage);
|
||||
}
|
||||
|
||||
public function testGetStatusMessageWithUnknownCode()
|
||||
{
|
||||
$fixture = new Apache_Solr_HttpTransport_Response(499, null, null);
|
||||
|
||||
$statusMessage = $fixture->getStatusMessage();
|
||||
$this->assertEquals("Unknown Status", $statusMessage);
|
||||
}
|
||||
|
||||
public function testGetBody()
|
||||
{
|
||||
$fixture = self::get200Response();
|
||||
|
||||
$body = $fixture->getBody();
|
||||
|
||||
$this->assertEquals(self::BODY_200, $body);
|
||||
}
|
||||
|
||||
public function testGetMimeType()
|
||||
{
|
||||
$fixture = self::get200Response();
|
||||
|
||||
$mimeType = $fixture->getMimeType();
|
||||
|
||||
$this->assertEquals(self::MIME_TYPE_200, $mimeType);
|
||||
}
|
||||
|
||||
public function testGetEncoding()
|
||||
{
|
||||
$fixture = self::get200Response();
|
||||
|
||||
$encoding = $fixture->getEncoding();
|
||||
|
||||
$this->assertEquals(self::ENCODING_200, $encoding);
|
||||
}
|
||||
|
||||
public function testGetStatusMessageWhenNotProvided()
|
||||
{
|
||||
// test 4 of the most common status code responses, probably don't need
|
||||
// to test all the codes we have
|
||||
|
||||
$fixture = new Apache_Solr_HttpTransport_Response(null, null, null, null, null);
|
||||
$this->assertEquals("Communication Error", $fixture->getStatusMessage(), 'Did not get correct default status message for status code 0');
|
||||
|
||||
$fixture = new Apache_Solr_HttpTransport_Response(200, null, null, null, null);
|
||||
$this->assertEquals("OK", $fixture->getStatusMessage(), 'Did not get correct default status message for status code 200');
|
||||
|
||||
$fixture = new Apache_Solr_HttpTransport_Response(400, null, null, null, null);
|
||||
$this->assertEquals("Bad Request", $fixture->getStatusMessage(), 'Did not get correct default status message for status code 400');
|
||||
|
||||
$fixture = new Apache_Solr_HttpTransport_Response(404, null, null, null, null);
|
||||
$this->assertEquals("Not Found", $fixture->getStatusMessage(), 'Did not get correct default status message for status code 404');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* - Neither the name of Servigistics, Inc. nor the names of
|
||||
* its contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @copyright Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)
|
||||
* @license http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD
|
||||
*
|
||||
* @package Apache
|
||||
* @subpackage Solr
|
||||
* @author Donovan Jimenez <djimenez@conduit-it.com>
|
||||
*/
|
||||
|
||||
/**
|
||||
* Apache_Solr_HttpTransportException Unit Tests
|
||||
*/
|
||||
class Apache_Solr_HttpTransportExceptionTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @expectedException PHPUnit_Framework_Error
|
||||
*/
|
||||
public function testConstructorRequiresResponse()
|
||||
{
|
||||
$fixture = new Apache_Solr_HttpTransportException();
|
||||
}
|
||||
|
||||
public function testGetResponse()
|
||||
{
|
||||
$response = Apache_Solr_ResponseTest::get0Response();
|
||||
$fixture = new Apache_Solr_HttpTransportException($response);
|
||||
|
||||
$this->assertEquals($response, $fixture->getResponse());
|
||||
}
|
||||
}
|
||||
194
SolrPhpClient/tests/Apache/Solr/ResponseTest.php
Normal file
194
SolrPhpClient/tests/Apache/Solr/ResponseTest.php
Normal file
@@ -0,0 +1,194 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* - Neither the name of Servigistics, Inc. nor the names of
|
||||
* its contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @copyright Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)
|
||||
* @license http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD
|
||||
*
|
||||
* @package Apache
|
||||
* @subpackage Solr
|
||||
* @author Donovan Jimenez <djimenez@conduit-it.com>
|
||||
*/
|
||||
|
||||
/**
|
||||
* Apache_Solr_Response Unit Test
|
||||
*/
|
||||
class Apache_Solr_ResponseTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
static public function get0Response($createDocuments = true, $collapseSingleValueArrays = true)
|
||||
{
|
||||
return new Apache_Solr_Response(Apache_Solr_HttpTransport_ResponseTest::get0Response(), $createDocuments, $collapseSingleValueArrays);
|
||||
}
|
||||
|
||||
static public function get200Response($createDocuments = true, $collapseSingleValueArrays = true)
|
||||
{
|
||||
return new Apache_Solr_Response(Apache_Solr_HttpTransport_ResponseTest::get200Response(), $createDocuments, $collapseSingleValueArrays);
|
||||
}
|
||||
|
||||
static public function get200ResponseWithDocuments($createDocuments = true, $collapseSingleValueArrays = true)
|
||||
{
|
||||
return new Apache_Solr_Response(Apache_Solr_HttpTransport_ResponseTest::get200ResponseWithDocuments(), $createDocuments, $collapseSingleValueArrays);
|
||||
}
|
||||
|
||||
static public function get400Response($createDocuments = true, $collapseSingleValueArrays = true)
|
||||
{
|
||||
return new Apache_Solr_Response(Apache_Solr_HttpTransport_ResponseTest::get400Response(), $createDocuments, $collapseSingleValueArrays);
|
||||
}
|
||||
|
||||
static public function get404Response($createDocuments = true, $collapseSingleValueArrays = true)
|
||||
{
|
||||
return new Apache_Solr_Response(Apache_Solr_HttpTransport_ResponseTest::get404Response(), $createDocuments, $collapseSingleValueArrays);
|
||||
}
|
||||
|
||||
public function testConstuctorWithValidBodyAndHeaders()
|
||||
{
|
||||
$fixture = self::get200Response();
|
||||
|
||||
// check that we parsed the HTTP status correctly
|
||||
$this->assertEquals(Apache_Solr_HttpTransport_ResponseTest::STATUS_CODE_200, $fixture->getHttpStatus());
|
||||
|
||||
// check that we received the body correctly
|
||||
$this->assertEquals(Apache_Solr_HttpTransport_ResponseTest::BODY_200, $fixture->getRawResponse());
|
||||
|
||||
// check that our defaults are correct
|
||||
$this->assertEquals(Apache_Solr_HttpTransport_ResponseTest::ENCODING_200, $fixture->getEncoding());
|
||||
$this->assertEquals(Apache_Solr_HttpTransport_ResponseTest::MIME_TYPE_200, $fixture->getType());
|
||||
}
|
||||
|
||||
public function testConstructorWithBadBodyAndHeaders()
|
||||
{
|
||||
$fixture = self::get0Response();
|
||||
|
||||
// check that our defaults are correct
|
||||
$this->assertEquals(0, $fixture->getHttpStatus());
|
||||
$this->assertEquals("UTF-8", $fixture->getEncoding());
|
||||
$this->assertEquals("text/plain", $fixture->getType());
|
||||
}
|
||||
|
||||
public function testMagicGetWithValidBodyAndHeaders()
|
||||
{
|
||||
$fixture = self::get200Response();
|
||||
|
||||
// test top level gets
|
||||
$this->assertType('stdClass', $fixture->responseHeader);
|
||||
$this->assertEquals(0, $fixture->responseHeader->status);
|
||||
$this->assertEquals(0, $fixture->responseHeader->QTime);
|
||||
|
||||
$this->assertType('stdClass', $fixture->response);
|
||||
$this->assertEquals(0, $fixture->response->numFound);
|
||||
|
||||
$this->assertTrue(is_array($fixture->response->docs));
|
||||
$this->assertEquals(0, count($fixture->response->docs));
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException Apache_Solr_ParserException
|
||||
*/
|
||||
public function testMagicGetWith0Response()
|
||||
{
|
||||
$fixture = self::get0Response();
|
||||
|
||||
// attempting to magic get a part of the response
|
||||
// should throw a ParserException
|
||||
$fixture->responseHeader;
|
||||
|
||||
$this->fail("Expected Apache_Solr_ParserException was not raised");
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException Apache_Solr_ParserException
|
||||
*/
|
||||
public function testMagicGetWith400Response()
|
||||
{
|
||||
$fixture = self::get400Response();
|
||||
|
||||
// attempting to magic get a part of the response
|
||||
// should throw a ParserException
|
||||
$fixture->responseHeader;
|
||||
|
||||
$this->fail("Expected Apache_Solr_ParserException was not raised");
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException Apache_Solr_ParserException
|
||||
*/
|
||||
public function testMagicGetWith404Response()
|
||||
{
|
||||
$fixture = self::get404Response();
|
||||
|
||||
// attempting to magic get a part of the response
|
||||
// should throw a ParserException
|
||||
$fixture->responseHeader;
|
||||
|
||||
$this->fail("Expected Apache_Solr_ParserException was not raised");
|
||||
}
|
||||
|
||||
public function testCreateDocuments()
|
||||
{
|
||||
$fixture = self::get200ResponseWithDocuments();
|
||||
|
||||
$this->assertTrue(count($fixture->response->docs) > 0, 'There are not 1 or more documents, cannot test');
|
||||
$this->assertType('Apache_Solr_Document', $fixture->response->docs[0], 'The first document is not of type Apache_Solr_Document');
|
||||
}
|
||||
|
||||
public function testDontCreateDocuments()
|
||||
{
|
||||
$fixture = self::get200ResponseWithDocuments(false);
|
||||
|
||||
$this->assertTrue(count($fixture->response->docs) > 0, 'There are not 1 or more documents, cannot test');
|
||||
$this->assertType('stdClass', $fixture->response->docs[0], 'The first document is not of type stdClass');
|
||||
}
|
||||
|
||||
public function testGetHttpStatusMessage()
|
||||
{
|
||||
$fixture = self::get200Response();
|
||||
|
||||
$this->assertEquals("OK", $fixture->getHttpStatusMessage());
|
||||
}
|
||||
|
||||
public function testMagicGetReturnsNullForUndefinedData()
|
||||
{
|
||||
$fixture = self::get200Response();
|
||||
|
||||
$this->assertNull($fixture->doesnotexist);
|
||||
}
|
||||
|
||||
public function testMagicIssetForDefinedProperty()
|
||||
{
|
||||
$fixture = self::get200Response();
|
||||
|
||||
$this->assertTrue(isset($fixture->responseHeader));
|
||||
}
|
||||
|
||||
public function testMagicIssetForUndefinedProperty()
|
||||
{
|
||||
$fixture = self::get200Response();
|
||||
|
||||
$this->assertFalse(isset($fixture->doesnotexist));
|
||||
}
|
||||
}
|
||||
47
SolrPhpClient/tests/Apache/Solr/Service/BalancerTest.php
Normal file
47
SolrPhpClient/tests/Apache/Solr/Service/BalancerTest.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* - Neither the name of Servigistics, Inc. nor the names of
|
||||
* its contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @copyright Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)
|
||||
* @license http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD
|
||||
*
|
||||
* @package Apache
|
||||
* @subpackage Solr
|
||||
* @author Donovan Jimenez <djimenez@conduit-it.com>
|
||||
*/
|
||||
|
||||
/**
|
||||
* Apache_Solr_Service_Balancer Unit Tests
|
||||
*/
|
||||
class Apache_Solr_Service_BalancerTest extends Apache_Solr_ServiceAbstractTest
|
||||
{
|
||||
public function getFixture()
|
||||
{
|
||||
return new Apache_Solr_Service_Balancer();
|
||||
}
|
||||
}
|
||||
139
SolrPhpClient/tests/Apache/Solr/ServiceAbstractTest.php
Normal file
139
SolrPhpClient/tests/Apache/Solr/ServiceAbstractTest.php
Normal file
@@ -0,0 +1,139 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2007-2011, Servigistics, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* - Neither the name of Servigistics, Inc. nor the names of
|
||||
* its contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @copyright Copyright 2007-2011 Servigistics, Inc. (http://servigistics.com)
|
||||
* @license http://solr-php-client.googlecode.com/svn/trunk/COPYING New BSD
|
||||
*
|
||||
* @package Apache
|
||||
* @subpackage Solr
|
||||
* @author Donovan Jimenez <djimenez@conduit-it.com>
|
||||
*/
|
||||
|
||||
/**
|
||||
* Provides base funcationality test for both Apache_Solr_Service and the
|
||||
* Apache_Solr_Service_Balancer classes.
|
||||
*/
|
||||
abstract class Apache_Solr_ServiceAbstractTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* Method that gets the appropriate instance for testing
|
||||
*/
|
||||
abstract public function getFixture();
|
||||
|
||||
/**
|
||||
* @dataProvider testEscapeDataProvider
|
||||
*/
|
||||
public function testEscape($input, $expectedOutput)
|
||||
{
|
||||
$fixture = $this->getFixture();
|
||||
|
||||
$this->assertEquals($expectedOutput, $fixture->escape($input));
|
||||
}
|
||||
|
||||
public function testEscapeDataProvider()
|
||||
{
|
||||
return array(
|
||||
array(
|
||||
"I should look the same",
|
||||
"I should look the same"
|
||||
),
|
||||
|
||||
array(
|
||||
"(There) are: ^lots \\ && of spec!al charaters",
|
||||
"\\(There\\) are\\: \\^lots \\\\ \\&& of spec\\!al charaters"
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider testEscapePhraseDataProvider
|
||||
*/
|
||||
public function testEscapePhrase($input, $expectedOutput)
|
||||
{
|
||||
$fixture = $this->getFixture();
|
||||
|
||||
$this->assertEquals($expectedOutput, $fixture->escapePhrase($input));
|
||||
}
|
||||
|
||||
public function testEscapePhraseDataProvider()
|
||||
{
|
||||
return array(
|
||||
array(
|
||||
"I'm a simple phrase",
|
||||
"I'm a simple phrase"
|
||||
),
|
||||
|
||||
array(
|
||||
"I have \"phrase\" characters",
|
||||
'I have \\"phrase\\" characters'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider testPhraseDataProvider
|
||||
*/
|
||||
public function testPhrase($input, $expectedOutput)
|
||||
{
|
||||
$fixture = $this->getFixture();
|
||||
|
||||
$this->assertEquals($expectedOutput, $fixture->phrase($input));
|
||||
}
|
||||
|
||||
public function testPhraseDataProvider()
|
||||
{
|
||||
return array(
|
||||
array(
|
||||
"I'm a simple phrase",
|
||||
'"I\'m a simple phrase"'
|
||||
),
|
||||
|
||||
array(
|
||||
"I have \"phrase\" characters",
|
||||
'"I have \\"phrase\\" characters"'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function testGetCreateDocumentWithDefaultConstructor()
|
||||
{
|
||||
$fixture = $this->getFixture();
|
||||
|
||||
$this->assertTrue($fixture->getCreateDocuments());
|
||||
}
|
||||
|
||||
public function testSetCreateDocuments()
|
||||
{
|
||||
$fixture = $this->getFixture();
|
||||
|
||||
$fixture->setCreateDocuments(false);
|
||||
|
||||
$this->assertFalse($fixture->getCreateDocuments());
|
||||
}
|
||||
}
|
||||
1119
SolrPhpClient/tests/Apache/Solr/ServiceTest.php
Normal file
1119
SolrPhpClient/tests/Apache/Solr/ServiceTest.php
Normal file
File diff suppressed because it is too large
Load Diff
20
SolrPhpClient/tests/README
Normal file
20
SolrPhpClient/tests/README
Normal file
@@ -0,0 +1,20 @@
|
||||
Use the run.php script included in this directory to run all unit tests for the
|
||||
Solr PHP Client library. Your system will require phpunit PEAR package - which
|
||||
you can get install instructions for at:
|
||||
|
||||
http://www.phpunit.de/
|
||||
|
||||
To generate the code coverage report, you will also need the XDebug pecl package
|
||||
installed, typically this can be done with a simple:
|
||||
|
||||
pecl install xdebug
|
||||
|
||||
If you need more information on installation, then please see the official website:
|
||||
|
||||
http://www.xdebug.org
|
||||
|
||||
The scripts, configuration, and test files in this directory have been confirmed to
|
||||
work with the following versions:
|
||||
|
||||
phpunit: 3.3.16
|
||||
xdebug: 2.0.4
|
||||
28
SolrPhpClient/tests/phpunit.bootstrap.inc
Normal file
28
SolrPhpClient/tests/phpunit.bootstrap.inc
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
// set error reporting high
|
||||
error_reporting(E_ALL | E_STRICT);
|
||||
|
||||
// make sure we see them
|
||||
ini_set('display_errors', 'On');
|
||||
|
||||
// make sure current directory and class directories are on include path
|
||||
// this is necessary for auto load to work
|
||||
set_include_path(
|
||||
// distribution files (where the zip / tgz is unpacked)
|
||||
dirname(dirname(__FILE__)) . PATH_SEPARATOR .
|
||||
|
||||
// test file directory "tests"
|
||||
dirname(__FILE__) . PATH_SEPARATOR .
|
||||
|
||||
// current include path (for PHPUnit, etc.)
|
||||
get_include_path()
|
||||
);
|
||||
|
||||
// set up an autoload for Zend / Pear style class loading
|
||||
spl_autoload_register(
|
||||
function($class)
|
||||
{
|
||||
include(str_replace("_", DIRECTORY_SEPARATOR, $class) . ".php");
|
||||
}
|
||||
);
|
||||
15
SolrPhpClient/tests/phpunit.xml
Normal file
15
SolrPhpClient/tests/phpunit.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<phpunit bootstrap="phpunit.bootstrap.inc" colors="true">
|
||||
<logging>
|
||||
<log type="coverage-html" target="coverage-report" charset="UTF-8"/>
|
||||
<!--<log type="testdox-text" target="testdox.txt" charset="UTF-8"/>-->
|
||||
</logging>
|
||||
<filter>
|
||||
<whitelist>
|
||||
<directory suffix=".php">../Apache</directory>
|
||||
<exclude>
|
||||
<file>./run.php</file>
|
||||
</exclude>
|
||||
</whitelist>
|
||||
</filter>
|
||||
</phpunit>
|
||||
42
SolrPhpClient/tests/run.php
Normal file
42
SolrPhpClient/tests/run.php
Normal file
@@ -0,0 +1,42 @@
|
||||
#! /usr/bin/php
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2007-2010, Conduit Internet Technologies, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* - Neither the name of Conduit Internet Technologies, Inc. nor the names of
|
||||
* its contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
// make sure the working directory is correct (parent directory)
|
||||
// phpunit will use it to include our configuration files and find
|
||||
// the following specified test suite
|
||||
chdir(dirname(__FILE__));
|
||||
|
||||
// run phpunit - will automatically use ./phpunit.xml for configuration
|
||||
// that configuration file points to a bootstrap that will include our test suite
|
||||
passthru("phpunit .");
|
||||
|
||||
// extra newline so our next prompt isn't stuck appended to the output
|
||||
echo "\n";
|
||||
Reference in New Issue
Block a user