Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
solarium
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
solarium
Commits
5d9b6d5e
Commit
5d9b6d5e
authored
Sep 10, 2012
by
Bas de Nooijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
php-cs-fixer changes
parent
fc819735
Changes
66
Hide whitespace changes
Inline
Side-by-side
Showing
66 changed files
with
213 additions
and
226 deletions
+213
-226
library/Solarium/Core/Client/Adapter/Curl.php
library/Solarium/Core/Client/Adapter/Curl.php
+2
-2
library/Solarium/Core/Client/Adapter/Http.php
library/Solarium/Core/Client/Adapter/Http.php
+2
-3
library/Solarium/Core/Client/Adapter/PeclHttp.php
library/Solarium/Core/Client/Adapter/PeclHttp.php
+4
-4
library/Solarium/Core/Client/Adapter/ZendHttp.php
library/Solarium/Core/Client/Adapter/ZendHttp.php
+6
-7
library/Solarium/Core/Client/Client.php
library/Solarium/Core/Client/Client.php
+19
-20
library/Solarium/Core/Client/Request.php
library/Solarium/Core/Client/Request.php
+8
-5
library/Solarium/Core/Client/Response.php
library/Solarium/Core/Client/Response.php
+1
-1
library/Solarium/Core/Configurable.php
library/Solarium/Core/Configurable.php
+3
-3
library/Solarium/Core/ConfigurableInterface.php
library/Solarium/Core/ConfigurableInterface.php
+3
-3
library/Solarium/Core/Event/PostCreateQuery.php
library/Solarium/Core/Event/PostCreateQuery.php
+2
-2
library/Solarium/Core/Event/PostCreateResult.php
library/Solarium/Core/Event/PostCreateResult.php
+2
-2
library/Solarium/Core/Event/PostExecute.php
library/Solarium/Core/Event/PostExecute.php
+1
-1
library/Solarium/Core/Event/PostExecuteRequest.php
library/Solarium/Core/Event/PostExecuteRequest.php
+1
-1
library/Solarium/Core/Event/PreCreateQuery.php
library/Solarium/Core/Event/PreCreateQuery.php
+2
-2
library/Solarium/Core/Event/PreCreateRequest.php
library/Solarium/Core/Event/PreCreateRequest.php
+1
-1
library/Solarium/Core/Event/PreCreateResult.php
library/Solarium/Core/Event/PreCreateResult.php
+2
-2
library/Solarium/Core/Event/PreExecute.php
library/Solarium/Core/Event/PreExecute.php
+1
-1
library/Solarium/Core/Event/PreExecuteRequest.php
library/Solarium/Core/Event/PreExecuteRequest.php
+3
-3
library/Solarium/Core/Plugin/Plugin.php
library/Solarium/Core/Plugin/Plugin.php
+0
-3
library/Solarium/Core/Plugin/PluginInterface.php
library/Solarium/Core/Plugin/PluginInterface.php
+0
-3
library/Solarium/Core/Query/Helper.php
library/Solarium/Core/Query/Helper.php
+4
-4
library/Solarium/Core/Query/Query.php
library/Solarium/Core/Query/Query.php
+2
-2
library/Solarium/Core/Query/ResponseParser.php
library/Solarium/Core/Query/ResponseParser.php
+3
-3
library/Solarium/Core/Query/Result/Result.php
library/Solarium/Core/Query/Result/Result.php
+3
-3
library/Solarium/Plugin/BufferedAdd/BufferedAdd.php
library/Solarium/Plugin/BufferedAdd/BufferedAdd.php
+1
-2
library/Solarium/Plugin/BufferedAdd/Event/Events.php
library/Solarium/Plugin/BufferedAdd/Event/Events.php
+2
-3
library/Solarium/Plugin/BufferedAdd/Event/PreCommit.php
library/Solarium/Plugin/BufferedAdd/Event/PreCommit.php
+1
-1
library/Solarium/Plugin/BufferedAdd/Event/PreFlush.php
library/Solarium/Plugin/BufferedAdd/Event/PreFlush.php
+3
-3
library/Solarium/Plugin/CustomizeRequest/CustomizeRequest.php
...ary/Solarium/Plugin/CustomizeRequest/CustomizeRequest.php
+2
-3
library/Solarium/Plugin/Loadbalancer/Event/EndpointFailure.php
...ry/Solarium/Plugin/Loadbalancer/Event/EndpointFailure.php
+1
-2
library/Solarium/Plugin/Loadbalancer/Loadbalancer.php
library/Solarium/Plugin/Loadbalancer/Loadbalancer.php
+4
-4
library/Solarium/Plugin/Loadbalancer/WeightedRandomChoice.php
...ary/Solarium/Plugin/Loadbalancer/WeightedRandomChoice.php
+3
-3
library/Solarium/Plugin/ParallelExecution/Event/ExecuteStart.php
.../Solarium/Plugin/ParallelExecution/Event/ExecuteStart.php
+0
-1
library/Solarium/QueryType/Analysis/Query/Document.php
library/Solarium/QueryType/Analysis/Query/Document.php
+1
-1
library/Solarium/QueryType/Analysis/ResponseParser/Document.php
...y/Solarium/QueryType/Analysis/ResponseParser/Document.php
+2
-3
library/Solarium/QueryType/Analysis/ResponseParser/Field.php
library/Solarium/QueryType/Analysis/ResponseParser/Field.php
+4
-6
library/Solarium/QueryType/Extract/Query.php
library/Solarium/QueryType/Extract/Query.php
+18
-16
library/Solarium/QueryType/Extract/RequestBuilder.php
library/Solarium/QueryType/Extract/RequestBuilder.php
+1
-1
library/Solarium/QueryType/MoreLikeThis/Query.php
library/Solarium/QueryType/MoreLikeThis/Query.php
+2
-2
library/Solarium/QueryType/Select/Query/Component/Component.php
...y/Solarium/QueryType/Select/Query/Component/Component.php
+1
-0
library/Solarium/QueryType/Select/Query/Component/Facet/MultiQuery.php
...ium/QueryType/Select/Query/Component/Facet/MultiQuery.php
+2
-2
library/Solarium/QueryType/Select/Query/Component/Facet/Range.php
...Solarium/QueryType/Select/Query/Component/Facet/Range.php
+0
-2
library/Solarium/QueryType/Select/Query/Component/FacetSet.php
...ry/Solarium/QueryType/Select/Query/Component/FacetSet.php
+13
-13
library/Solarium/QueryType/Select/Query/Component/Grouping.php
...ry/Solarium/QueryType/Select/Query/Component/Grouping.php
+3
-3
library/Solarium/QueryType/Select/Query/Component/Highlighting/Highlighting.php
...Type/Select/Query/Component/Highlighting/Highlighting.php
+8
-9
library/Solarium/QueryType/Select/Query/Component/MoreLikeThis.php
...olarium/QueryType/Select/Query/Component/MoreLikeThis.php
+1
-1
library/Solarium/QueryType/Select/Query/Component/Stats/Stats.php
...Solarium/QueryType/Select/Query/Component/Stats/Stats.php
+2
-2
library/Solarium/QueryType/Select/Query/FilterQuery.php
library/Solarium/QueryType/Select/Query/FilterQuery.php
+2
-0
library/Solarium/QueryType/Select/Query/Query.php
library/Solarium/QueryType/Select/Query/Query.php
+8
-7
library/Solarium/QueryType/Select/RequestBuilder/Component/ComponentRequestBuilderInterface.php
...estBuilder/Component/ComponentRequestBuilderInterface.php
+1
-1
library/Solarium/QueryType/Select/RequestBuilder/Component/FacetSet.php
...um/QueryType/Select/RequestBuilder/Component/FacetSet.php
+2
-2
library/Solarium/QueryType/Select/ResponseParser/Component/ComponentParserInterface.php
...ect/ResponseParser/Component/ComponentParserInterface.php
+3
-3
library/Solarium/QueryType/Select/ResponseParser/Component/Debug.php
...arium/QueryType/Select/ResponseParser/Component/Debug.php
+6
-6
library/Solarium/QueryType/Select/ResponseParser/Component/FacetSet.php
...um/QueryType/Select/ResponseParser/Component/FacetSet.php
+9
-9
library/Solarium/QueryType/Select/ResponseParser/Component/Grouping.php
...um/QueryType/Select/ResponseParser/Component/Grouping.php
+3
-3
library/Solarium/QueryType/Select/ResponseParser/Component/Highlighting.php
...ueryType/Select/ResponseParser/Component/Highlighting.php
+3
-3
library/Solarium/QueryType/Select/ResponseParser/Component/MoreLikeThis.php
...ueryType/Select/ResponseParser/Component/MoreLikeThis.php
+3
-3
library/Solarium/QueryType/Select/ResponseParser/Component/Spellcheck.php
.../QueryType/Select/ResponseParser/Component/Spellcheck.php
+11
-12
library/Solarium/QueryType/Select/ResponseParser/ResponseParser.php
...larium/QueryType/Select/ResponseParser/ResponseParser.php
+1
-1
library/Solarium/QueryType/Select/Result/Document.php
library/Solarium/QueryType/Select/Result/Document.php
+2
-2
library/Solarium/QueryType/Terms/Query.php
library/Solarium/QueryType/Terms/Query.php
+2
-4
library/Solarium/QueryType/Terms/ResponseParser.php
library/Solarium/QueryType/Terms/ResponseParser.php
+1
-1
library/Solarium/QueryType/Update/Query/Command/Add.php
library/Solarium/QueryType/Update/Query/Command/Add.php
+2
-2
library/Solarium/QueryType/Update/Query/Query.php
library/Solarium/QueryType/Update/Query/Query.php
+2
-2
library/Solarium/QueryType/Update/RequestBuilder.php
library/Solarium/QueryType/Update/RequestBuilder.php
+1
-1
library/Solarium/QueryType/Update/ResponseParser.php
library/Solarium/QueryType/Update/ResponseParser.php
+1
-0
No files found.
library/Solarium/Core/Client/Adapter/Curl.php
View file @
5d9b6d5e
...
@@ -131,8 +131,8 @@ class Curl extends Configurable implements AdapterInterface
...
@@ -131,8 +131,8 @@ class Curl extends Configurable implements AdapterInterface
* Create curl handle for a request
* Create curl handle for a request
*
*
* @throws InvalidArgumentException
* @throws InvalidArgumentException
* @param Request $request
* @param Request
$request
* @param Endpoint $endpoint
* @param Endpoint
$endpoint
* @return resource
* @return resource
*/
*/
public
function
createHandle
(
$request
,
$endpoint
)
public
function
createHandle
(
$request
,
$endpoint
)
...
...
library/Solarium/Core/Client/Adapter/Http.php
View file @
5d9b6d5e
...
@@ -43,7 +43,6 @@ use Solarium\Core\Client\Response;
...
@@ -43,7 +43,6 @@ use Solarium\Core\Client\Response;
use
Solarium\Core\Client\Endpoint
;
use
Solarium\Core\Client\Endpoint
;
use
Solarium\Exception\HttpException
;
use
Solarium\Exception\HttpException
;
/**
/**
* Basic HTTP adapter using a stream
* Basic HTTP adapter using a stream
*/
*/
...
@@ -54,8 +53,8 @@ class Http extends Configurable implements AdapterInterface
...
@@ -54,8 +53,8 @@ class Http extends Configurable implements AdapterInterface
* Handle Solr communication
* Handle Solr communication
*
*
* @throws HttpException
* @throws HttpException
* @param Request $request
* @param Request
$request
* @param Endpoint $endpoint
* @param Endpoint
$endpoint
* @return Response
* @return Response
*/
*/
public
function
execute
(
$request
,
$endpoint
)
public
function
execute
(
$request
,
$endpoint
)
...
...
library/Solarium/Core/Client/Adapter/PeclHttp.php
View file @
5d9b6d5e
...
@@ -76,8 +76,8 @@ class PeclHttp extends Configurable implements AdapterInterface
...
@@ -76,8 +76,8 @@ class PeclHttp extends Configurable implements AdapterInterface
* Execute a Solr request using the Pecl Http
* Execute a Solr request using the Pecl Http
*
*
* @throws HttpException
* @throws HttpException
* @param Request $request
* @param Request
$request
* @param Endpoint $endpoint
* @param Endpoint
$endpoint
* @return Response
* @return Response
*/
*/
public
function
execute
(
$request
,
$endpoint
)
public
function
execute
(
$request
,
$endpoint
)
...
@@ -133,8 +133,8 @@ class PeclHttp extends Configurable implements AdapterInterface
...
@@ -133,8 +133,8 @@ class PeclHttp extends Configurable implements AdapterInterface
* HTTP Predefined Constant}
* HTTP Predefined Constant}
*
*
* @throws InvalidArgumentException
* @throws InvalidArgumentException
* @param
Request
$request
* @param
Request
$request
* @param
Endpoint
$endpoint
* @param
Endpoint
$endpoint
* @param HttpRequest
* @param HttpRequest
*/
*/
public
function
toHttpRequest
(
$request
,
$endpoint
)
public
function
toHttpRequest
(
$request
,
$endpoint
)
...
...
library/Solarium/Core/Client/Adapter/ZendHttp.php
View file @
5d9b6d5e
...
@@ -46,7 +46,6 @@ use Solarium\Core\Client\Request;
...
@@ -46,7 +46,6 @@ use Solarium\Core\Client\Request;
use
Solarium\Core\Client\Response
;
use
Solarium\Core\Client\Response
;
use
Solarium\Core\Client\Endpoint
;
use
Solarium\Core\Client\Endpoint
;
use
Solarium\Exception\HttpException
;
use
Solarium\Exception\HttpException
;
use
Solarium\Exception\RuntimeException
;
use
Solarium\Exception\OutOfBoundsException
;
use
Solarium\Exception\OutOfBoundsException
;
/**
/**
...
@@ -162,8 +161,8 @@ class ZendHttp extends Configurable implements AdapterInterface
...
@@ -162,8 +161,8 @@ class ZendHttp extends Configurable implements AdapterInterface
* Execute a Solr request using the Zend_Http_Client instance
* Execute a Solr request using the Zend_Http_Client instance
*
*
* @throws HttpException
* @throws HttpException
* @param Request $request
* @param Request
$request
* @param Endpoint $endpoint
* @param Endpoint
$endpoint
* @return Response
* @return Response
*/
*/
public
function
execute
(
$request
,
$endpoint
)
public
function
execute
(
$request
,
$endpoint
)
...
@@ -211,8 +210,8 @@ class ZendHttp extends Configurable implements AdapterInterface
...
@@ -211,8 +210,8 @@ class ZendHttp extends Configurable implements AdapterInterface
* Prepare a solarium response from the given request and client
* Prepare a solarium response from the given request and client
* response
* response
*
*
* @param
Request
$request
* @param
Request
$request
* @param \Zend_Http_Response $response
* @param
\Zend_Http_Response $response
* @return Response
* @return Response
*/
*/
protected
function
prepareResponse
(
$request
,
$response
)
protected
function
prepareResponse
(
$request
,
$response
)
...
@@ -239,8 +238,8 @@ class ZendHttp extends Configurable implements AdapterInterface
...
@@ -239,8 +238,8 @@ class ZendHttp extends Configurable implements AdapterInterface
/**
/**
* Prepare the client to send the file and params in request
* Prepare the client to send the file and params in request
*
*
* @param \Zend_Http_Client $client
* @param
\Zend_Http_Client $client
* @param
Request
$request
* @param
Request
$request
* @return void
* @return void
*/
*/
protected
function
prepareFileUpload
(
$client
,
$request
)
protected
function
prepareFileUpload
(
$client
,
$request
)
...
...
library/Solarium/Core/Client/Client.php
View file @
5d9b6d5e
...
@@ -59,7 +59,6 @@ use Solarium\Core\Event\PostExecute as PostExecuteEvent;
...
@@ -59,7 +59,6 @@ use Solarium\Core\Event\PostExecute as PostExecuteEvent;
use
Solarium\Core\Event\PreExecuteRequest
as
PreExecuteRequestEvent
;
use
Solarium\Core\Event\PreExecuteRequest
as
PreExecuteRequestEvent
;
use
Solarium\Core\Event\PostExecuteRequest
as
PostExecuteRequestEvent
;
use
Solarium\Core\Event\PostExecuteRequest
as
PostExecuteRequestEvent
;
/**
/**
* Main interface for interaction with Solr
* Main interface for interaction with Solr
*
*
...
@@ -265,8 +264,8 @@ class Client extends Configurable
...
@@ -265,8 +264,8 @@ class Client extends Configurable
* In case of options a new endpoint instance wil be created based on the options.
* In case of options a new endpoint instance wil be created based on the options.
*
*
* @throws InvalidArgumentException
* @throws InvalidArgumentException
* @param Endpoint|array $endpoint
* @param Endpoint|array
$endpoint
* @return self Provides fluent interface
* @return self
Provides fluent interface
*/
*/
public
function
addEndpoint
(
$endpoint
)
public
function
addEndpoint
(
$endpoint
)
{
{
...
@@ -321,7 +320,7 @@ class Client extends Configurable
...
@@ -321,7 +320,7 @@ class Client extends Configurable
* Get an endpoint by key
* Get an endpoint by key
*
*
* @throws OutOfBoundsException
* @throws OutOfBoundsException
* @param string $key
* @param string
$key
* @return Endpoint
* @return Endpoint
*/
*/
public
function
getEndpoint
(
$key
=
null
)
public
function
getEndpoint
(
$key
=
null
)
...
@@ -399,8 +398,8 @@ class Client extends Configurable
...
@@ -399,8 +398,8 @@ class Client extends Configurable
*
*
* All queries executed without a specific endpoint will use this default endpoint.
* All queries executed without a specific endpoint will use this default endpoint.
*
*
* @param string|Endpoint $endpoint
* @param string|Endpoint
$endpoint
* @return self Provides fluent interface
* @return self
Provides fluent interface
* @throws OutOfBoundsException
* @throws OutOfBoundsException
*/
*/
public
function
setDefaultEndpoint
(
$endpoint
)
public
function
setDefaultEndpoint
(
$endpoint
)
...
@@ -489,7 +488,7 @@ class Client extends Configurable
...
@@ -489,7 +488,7 @@ class Client extends Configurable
* If {@see $adapter} doesn't hold an instance a new one will be created by
* If {@see $adapter} doesn't hold an instance a new one will be created by
* calling {@see createAdapter()}
* calling {@see createAdapter()}
*
*
* @param boolean
$autoload
* @param boolean $autoload
* @return AdapterInterface
* @return AdapterInterface
*/
*/
public
function
getAdapter
(
$autoload
=
true
)
public
function
getAdapter
(
$autoload
=
true
)
...
@@ -569,10 +568,10 @@ class Client extends Configurable
...
@@ -569,10 +568,10 @@ class Client extends Configurable
* or a manual require.
* or a manual require.
*
*
* @throws InvalidArgumentException
* @throws InvalidArgumentException
* @param string
$key
* @param string $key
* @param string|PluginInterface
$plugin
* @param string|PluginInterface $plugin
* @param array
$options
* @param array $options
* @return self
Provides fluent interface
* @return self Provides fluent interface
*/
*/
public
function
registerPlugin
(
$key
,
$plugin
,
$options
=
array
())
public
function
registerPlugin
(
$key
,
$plugin
,
$options
=
array
())
{
{
...
@@ -630,8 +629,8 @@ class Client extends Configurable
...
@@ -630,8 +629,8 @@ class Client extends Configurable
* Get a plugin instance
* Get a plugin instance
*
*
* @throws OutOfBoundsException
* @throws OutOfBoundsException
* @param string
$key
* @param string $key
* @param boolean
$autocreate
* @param boolean $autocreate
* @return PluginInterface|null
* @return PluginInterface|null
*/
*/
public
function
getPlugin
(
$key
,
$autocreate
=
true
)
public
function
getPlugin
(
$key
,
$autocreate
=
true
)
...
@@ -657,7 +656,7 @@ class Client extends Configurable
...
@@ -657,7 +656,7 @@ class Client extends Configurable
* You can remove a plugin by passing the plugin key, or the plugin instance
* You can remove a plugin by passing the plugin key, or the plugin instance
*
*
* @param string|PluginInterface $plugin
* @param string|PluginInterface $plugin
* @return self
Provides fluent interface
* @return self Provides fluent interface
*/
*/
public
function
removePlugin
(
$plugin
)
public
function
removePlugin
(
$plugin
)
{
{
...
@@ -681,7 +680,7 @@ class Client extends Configurable
...
@@ -681,7 +680,7 @@ class Client extends Configurable
* Creates a request based on a query instance
* Creates a request based on a query instance
*
*
* @throws UnexpectedValueException
* @throws UnexpectedValueException
* @param QueryInterface $query
* @param QueryInterface
$query
* @return Request
* @return Request
*/
*/
public
function
createRequest
(
QueryInterface
$query
)
public
function
createRequest
(
QueryInterface
$query
)
...
@@ -711,8 +710,8 @@ class Client extends Configurable
...
@@ -711,8 +710,8 @@ class Client extends Configurable
* Creates a result object
* Creates a result object
*
*
* @throws UnexpectedValueException;
* @throws UnexpectedValueException;
* @param QueryInterface $query
* @param QueryInterface
$query
* @param array Response $response
* @param array Response
$response
* @return ResultInterface
* @return ResultInterface
*/
*/
public
function
createResult
(
QueryInterface
$query
,
$response
)
public
function
createResult
(
QueryInterface
$query
,
$response
)
...
@@ -959,8 +958,8 @@ class Client extends Configurable
...
@@ -959,8 +958,8 @@ class Client extends Configurable
* Create a query instance
* Create a query instance
*
*
* @throws InvalidArgumentException|UnexpectedValueException
* @throws InvalidArgumentException|UnexpectedValueException
* @param string $type
* @param string
$type
* @param array $options
* @param array
$options
* @return \Solarium\Core\Query\Query
* @return \Solarium\Core\Query\Query
*/
*/
public
function
createQuery
(
$type
,
$options
=
null
)
public
function
createQuery
(
$type
,
$options
=
null
)
...
@@ -1083,7 +1082,7 @@ class Client extends Configurable
...
@@ -1083,7 +1082,7 @@ class Client extends Configurable
/**
/**
* Create an extract query instance
* Create an extract query instance
*
*
* @param mixed $options
* @param mixed
$options
* @return \Solarium\QueryType\Extract\Query
* @return \Solarium\QueryType\Extract\Query
*/
*/
public
function
createExtract
(
$options
=
null
)
public
function
createExtract
(
$options
=
null
)
...
...
library/Solarium/Core/Client/Request.php
View file @
5d9b6d5e
...
@@ -324,7 +324,7 @@ class Request extends Configurable
...
@@ -324,7 +324,7 @@ class Request extends Configurable
/**
/**
* Set the file to upload via "multipart/form-data" POST request
* Set the file to upload via "multipart/form-data" POST request
*
*
* @param string $filename Name of file to upload
* @param
string $filename Name of file to upload
* @return self
* @return self
*/
*/
public
function
setFileUpload
(
$filename
)
public
function
setFileUpload
(
$filename
)
...
@@ -334,6 +334,7 @@ class Request extends Configurable
...
@@ -334,6 +334,7 @@ class Request extends Configurable
}
}
$this
->
setOption
(
'file'
,
$filename
);
$this
->
setOption
(
'file'
,
$filename
);
return
$this
;
return
$this
;
}
}
...
@@ -459,13 +460,15 @@ class Request extends Configurable
...
@@ -459,13 +460,15 @@ class Request extends Configurable
*
*
* If one or both values are NULL authentication will be disabled
* If one or both values are NULL authentication will be disabled
*
*
* @param string $username
* @param
string $username
* @param string $password
* @param
string $password
* @return self Provides fluent interface
* @return self
Provides fluent interface
*/
*/
public
function
setAuthentication
(
$username
,
$password
)
{
public
function
setAuthentication
(
$username
,
$password
)
{
$this
->
setOption
(
'username'
,
$username
);
$this
->
setOption
(
'username'
,
$username
);
$this
->
setOption
(
'password'
,
$password
);
$this
->
setOption
(
'password'
,
$password
);
return
$this
;
return
$this
;
}
}
...
...
library/Solarium/Core/Client/Response.php
View file @
5d9b6d5e
...
@@ -131,7 +131,7 @@ class Response
...
@@ -131,7 +131,7 @@ class Response
* Set headers
* Set headers
*
*
* @throws HttpException
* @throws HttpException
* @param array $headers
* @param array
$headers
* @return void
* @return void
*/
*/
public
function
setHeaders
(
$headers
)
public
function
setHeaders
(
$headers
)
...
...
library/Solarium/Core/Configurable.php
View file @
5d9b6d5e
...
@@ -66,7 +66,7 @@ class Configurable implements ConfigurableInterface
...
@@ -66,7 +66,7 @@ class Configurable implements ConfigurableInterface
* After handling the options the {@link _init()} method is called.
* After handling the options the {@link _init()} method is called.
*
*
* @throws InvalidArgumentException
* @throws InvalidArgumentException
* @param array|\Zend_Config $options
* @param array|\Zend_Config
$options
* @return void
* @return void
*/
*/
public
function
__construct
(
$options
=
null
)
public
function
__construct
(
$options
=
null
)
...
@@ -86,8 +86,8 @@ class Configurable implements ConfigurableInterface
...
@@ -86,8 +86,8 @@ class Configurable implements ConfigurableInterface
* Zend Framework, but can also easily be implemented in any other object.
* Zend Framework, but can also easily be implemented in any other object.
*
*
* @throws InvalidArgumentException
* @throws InvalidArgumentException
* @param array|\Zend_Config $options
* @param array|\Zend_Config
$options
* @param boolean $overwrite True for overwriting existing options, false
* @param boolean
$overwrite True for overwriting existing options, false
* for merging (new values overwrite old ones if needed)
* for merging (new values overwrite old ones if needed)
*
*
* @return void
* @return void
...
...
library/Solarium/Core/ConfigurableInterface.php
View file @
5d9b6d5e
...
@@ -58,7 +58,7 @@ interface ConfigurableInterface
...
@@ -58,7 +58,7 @@ interface ConfigurableInterface
* After handling the options the {@link _init()} method is called.
* After handling the options the {@link _init()} method is called.
*
*
* @throws InvalidArgumentException
* @throws InvalidArgumentException
* @param array|\Zend_Config $options
* @param array|\Zend_Config
$options
* @return void
* @return void
*/
*/
public
function
__construct
(
$options
=
null
);
public
function
__construct
(
$options
=
null
);
...
@@ -71,8 +71,8 @@ interface ConfigurableInterface
...
@@ -71,8 +71,8 @@ interface ConfigurableInterface
* Zend Framework, but can also easily be implemented in any other object.
* Zend Framework, but can also easily be implemented in any other object.
*
*
* @throws InvalidArgumentException
* @throws InvalidArgumentException
* @param array|\Zend_Config $options
* @param array|\Zend_Config
$options
* @param boolean $overwrite True for overwriting existing options, false
* @param boolean
$overwrite True for overwriting existing options, false
* for merging (new values overwrite old ones if needed)
* for merging (new values overwrite old ones if needed)
*
*
* @return void
* @return void
...
...
library/Solarium/Core/Event/PostCreateQuery.php
View file @
5d9b6d5e
...
@@ -64,8 +64,8 @@ class PostCreateQuery extends Event
...
@@ -64,8 +64,8 @@ class PostCreateQuery extends Event
/**
/**
* Event constructor
* Event constructor
*
*
* @param string $type
* @param string
$type
* @param array $query
* @param array
$query
* @param QueryInterface $query
* @param QueryInterface $query
*/
*/
public
function
__construct
(
$type
,
$options
,
QueryInterface
$query
)
public
function
__construct
(
$type
,
$options
,
QueryInterface
$query
)
...
...
library/Solarium/Core/Event/PostCreateResult.php
View file @
5d9b6d5e
...
@@ -66,8 +66,8 @@ class PostCreateResult extends Event
...
@@ -66,8 +66,8 @@ class PostCreateResult extends Event
/**
/**
* Event constructor
* Event constructor
*
*
* @param QueryInterface $query
* @param QueryInterface
$query
* @param Response $response
* @param Response
$response
* @param ResultInterface $result
* @param ResultInterface $result
*/
*/
public
function
__construct
(
QueryInterface
$query
,
Response
$response
,
ResultInterface
$result
)
public
function
__construct
(
QueryInterface
$query
,
Response
$response
,
ResultInterface
$result
)
...
...
library/Solarium/Core/Event/PostExecute.php
View file @
5d9b6d5e
...
@@ -60,7 +60,7 @@ class PostExecute extends Event
...
@@ -60,7 +60,7 @@ class PostExecute extends Event
/**
/**
* Event constructor
* Event constructor
*
*
* @param QueryInterface $query
* @param QueryInterface
$query
* @param ResultInterface $result
* @param ResultInterface $result
*/
*/
public
function
__construct
(
QueryInterface
$query
,
ResultInterface
$result
)
public
function
__construct
(
QueryInterface
$query
,
ResultInterface
$result
)
...
...
library/Solarium/Core/Event/PostExecuteRequest.php
View file @
5d9b6d5e
...
@@ -66,7 +66,7 @@ class PostExecuteRequest extends Event
...
@@ -66,7 +66,7 @@ class PostExecuteRequest extends Event
/**
/**
* Event constructor
* Event constructor
*
*
* @param Request $request
* @param Request
$request
* @param Endpoint $endpoint
* @param Endpoint $endpoint
* @param Response $response
* @param Response $response
*/
*/
...
...
library/Solarium/Core/Event/PreCreateQuery.php
View file @
5d9b6d5e
...
@@ -64,7 +64,7 @@ class PreCreateQuery extends Event
...
@@ -64,7 +64,7 @@ class PreCreateQuery extends Event
/**
/**
* Event constructor
* Event constructor
*
*
* @param string $type
* @param string
$type
* @param array|null $query
* @param array|null $query
*/
*/
public
function
__construct
(
$type
,
$options
)
public
function
__construct
(
$type
,
$options
)
...
@@ -86,7 +86,7 @@ class PreCreateQuery extends Event
...
@@ -86,7 +86,7 @@ class PreCreateQuery extends Event
/**
/**
* Set the query object for this event, this overrides default execution
* Set the query object for this event, this overrides default execution
*
*
* @param QueryInterface $query
* @param
QueryInterface $query
* @return void
* @return void
*/
*/
public
function
setQuery
(
$query
)
public
function
setQuery
(
$query
)
...
...
library/Solarium/Core/Event/PreCreateRequest.php
View file @
5d9b6d5e
...
@@ -82,7 +82,7 @@ class PreCreateRequest extends Event
...
@@ -82,7 +82,7 @@ class PreCreateRequest extends Event
*
*
* If you set this request value the default execution is skipped and this request is directly returned
* If you set this request value the default execution is skipped and this request is directly returned
*
*
* @param Request $request
* @param
Request $request
* @return void
* @return void
*/
*/
public
function
setRequest
(
Request
$request
)
public
function
setRequest
(
Request
$request
)
...
...
library/Solarium/Core/Event/PreCreateResult.php
View file @
5d9b6d5e
...
@@ -67,7 +67,7 @@ class PreCreateResult extends Event
...
@@ -67,7 +67,7 @@ class PreCreateResult extends Event
* Event constructor
* Event constructor
*
*
* @param QueryInterface $query
* @param QueryInterface $query
* @param Response $response
* @param Response
$response
*/
*/
public
function
__construct
(
QueryInterface
$query
,
Response
$response
)
public
function
__construct
(
QueryInterface
$query
,
Response
$response
)
{
{
...
@@ -108,7 +108,7 @@ class PreCreateResult extends Event
...
@@ -108,7 +108,7 @@ class PreCreateResult extends Event
/**
/**
* Set the result object for this event, overrides default execution
* Set the result object for this event, overrides default execution
*
*
* @param ResultInterface $result
* @param
ResultInterface $result
* @return void
* @return void
*/
*/
public
function
setResult
(
$result
)
public
function
setResult
(
$result
)
...
...
library/Solarium/Core/Event/PreExecute.php
View file @
5d9b6d5e
...
@@ -90,7 +90,7 @@ class PreExecute extends Event
...
@@ -90,7 +90,7 @@ class PreExecute extends Event
/**
/**
* Set the result object for this event, overrides default execution
* Set the result object for this event, overrides default execution
*
*
* @param ResultInterface $result
* @param
ResultInterface $result
* @return void
* @return void
*/
*/
public
function
setResult
(
$result
)
public
function
setResult
(
$result
)
...
...
library/Solarium/Core/Event/PreExecuteRequest.php
View file @
5d9b6d5e
...
@@ -66,7 +66,7 @@ class PreExecuteRequest extends Event
...
@@ -66,7 +66,7 @@ class PreExecuteRequest extends Event
/**
/**
* Event constructor
* Event constructor
*
*
* @param Request $request
* @param Request
$request
* @param Endpoint $endpoint
* @param Endpoint $endpoint
*/
*/
public
function
__construct
(
Request
$request
,
Endpoint
$endpoint
)
public
function
__construct
(
Request
$request
,
Endpoint
$endpoint
)
...
@@ -98,7 +98,7 @@ class PreExecuteRequest extends Event
...
@@ -98,7 +98,7 @@ class PreExecuteRequest extends Event
/**
/**
* Get the request object for this event
* Get the request object for this event
*
*
* @param Request $request
* @param
Request $request
* @return void
* @return void
*/
*/
public
function
setRequest
(
$request
)
public
function
setRequest
(
$request
)
...
@@ -119,7 +119,7 @@ class PreExecuteRequest extends Event
...
@@ -119,7 +119,7 @@ class PreExecuteRequest extends Event
/**
/**
* Set the response object for this event, overrides default execution
* Set the response object for this event, overrides default execution
*
*
* @param Response $response
* @param
Response $response
* @return void
* @return void
*/
*/
public
function
setResponse
(
$response
)
public
function
setResponse
(
$response
)
...
...
library/Solarium/Core/Plugin/Plugin.php
View file @
5d9b6d5e
...
@@ -40,9 +40,6 @@ namespace Solarium\Core\Plugin;
...
@@ -40,9 +40,6 @@ namespace Solarium\Core\Plugin;
use
Solarium\Core\Client\Client
;
use
Solarium\Core\Client\Client
;
use
Solarium\Core\Configurable
;
use
Solarium\Core\Configurable
;
use
Solarium\Core\Query\Query
;
use
Solarium\Core\Query\Query
;
use
Solarium\Core\Client\Request
;
use
Solarium\Core\Client\Response
;
use
Solarium\Core\Query\Result\Result
;
/**
/**
* Base class for plugins
* Base class for plugins
...
...
library/Solarium/Core/Plugin/PluginInterface.php
View file @
5d9b6d5e
...
@@ -40,9 +40,6 @@ namespace Solarium\Core\Plugin;
...
@@ -40,9 +40,6 @@ namespace Solarium\Core\Plugin;
use
Solarium\Core\ConfigurableInterface
;
use
Solarium\Core\ConfigurableInterface
;
use
Solarium\Core\Client\Client
;
use
Solarium\Core\Client\Client
;
use
Solarium\Core\Query\Query
;
use
Solarium\Core\Query\Query
;
use
Solarium\Core\Client\Request
;
use
Solarium\Core\Client\Response
;
use
Solarium\Core\Query\Result\Result
;
/**
/**
* Interface for plugins
* Interface for plugins
...
...
library/Solarium/Core/Query/Helper.php
View file @
5d9b6d5e
...
@@ -286,9 +286,9 @@ class Helper
...
@@ -286,9 +286,9 @@ class Helper
* Render a qparser plugin call
* Render a qparser plugin call
*
*
* @throws InvalidArgumentException
* @throws InvalidArgumentException
* @param string $name
* @param string
$name
* @param array $params
* @param array
$params
* @param boolean $dereferenced
* @param boolean
$dereferenced
* @return string
* @return string
*/
*/
public
function
qparser
(
$name
,
$params
=
array
(),
$dereferenced
=
false
)
public
function
qparser
(
$name
,
$params
=
array
(),
$dereferenced
=
false
)
...
@@ -369,7 +369,7 @@ class Helper
...
@@ -369,7 +369,7 @@ class Helper
* Render placeholders in a querystring
* Render placeholders in a querystring
*
*
* @throws InvalidArgumentException
* @throws InvalidArgumentException
* @param array $matches
* @param array
$matches
* @return string
* @return string
*/
*/
protected
function
renderPlaceHolder
(
$matches
)
protected
function
renderPlaceHolder
(
$matches
)
...
...
library/Solarium/Core/Query/Query.php
View file @
5d9b6d5e
...
@@ -180,7 +180,7 @@ abstract class Query extends Configurable implements QueryInterface
...
@@ -180,7 +180,7 @@ abstract class Query extends Configurable implements QueryInterface
* Set responsewriter option
* Set responsewriter option
*
*
* @param string $value
* @param string $value
* @return self
Provides fluent interface
* @return self Provides fluent interface
*/
*/
public
function
setResponseWriter
(
$value
)
public
function
setResponseWriter
(
$value
)
{
{
...
@@ -201,7 +201,7 @@ abstract class Query extends Configurable implements QueryInterface
...
@@ -201,7 +201,7 @@ abstract class Query extends Configurable implements QueryInterface
public
function
getResponseWriter
()
public
function
getResponseWriter
()
{
{
$responseWriter
=
$this
->
getOption
(
'responsewriter'
);
$responseWriter
=
$this
->
getOption
(
'responsewriter'
);
if
(
$responseWriter
===
null
)
{
if
(
$responseWriter
===
null
)
{
$responseWriter
=
self
::
WT_JSON
;
$responseWriter
=
self
::
WT_JSON
;
}
}
...
...
library/Solarium/Core/Query/ResponseParser.php
View file @
5d9b6d5e
...
@@ -63,7 +63,7 @@ abstract class ResponseParser
...
@@ -63,7 +63,7 @@ abstract class ResponseParser
$key
=
$data
[
$i
];
$key
=
$data
[
$i
];
$value
=
$data
[
$i
+
1
];
$value
=
$data
[
$i
+
1
];
if
(
array_key_exists
(
$key
,
$keys
))
{
if
(
array_key_exists
(
$key
,
$keys
))
{
if
(
$keys
[
$key
]
==
1
)
{
if
(
$keys
[
$key
]
==
1
)
{
$result
[
$key
]
=
array
(
$result
[
$key
]);
$result
[
$key
]
=
array
(
$result
[
$key
]);
}
}
$result
[
$key
][]
=
$value
;
$result
[
$key
][]
=
$value
;
...
@@ -80,8 +80,8 @@ abstract class ResponseParser
...
@@ -80,8 +80,8 @@ abstract class ResponseParser
/**
/**
* Parses header data (if available) and adds it to result data
* Parses header data (if available) and adds it to result data
*
*
* @param array $data
* @param
array $data
* @param array $result
* @param
array $result
* @return mixed
* @return mixed
*/
*/
public
function
addHeaderInfo
(
$data
,
$result
)
public
function
addHeaderInfo
(
$data
,
$result
)
...
...
library/Solarium/Core/Query/Result/Result.php
View file @
5d9b6d5e
...
@@ -87,9 +87,9 @@ class Result implements ResultInterface
...
@@ -87,9 +87,9 @@ class Result implements ResultInterface
* Constructor
* Constructor
*
*
* @throws HttpException
* @throws HttpException
* @param Client $client
* @param Client
$client
* @param Query $query
* @param Query
$query
* @param Response $response
* @param Response
$response
* @return void
* @return void
*/
*/
public
function
__construct
(
$client
,
$query
,
$response
)
public
function
__construct
(
$client
,
$query
,
$response
)
...
...
library/Solarium/Plugin/BufferedAdd/BufferedAdd.php
View file @
5d9b6d5e
...
@@ -42,7 +42,6 @@ use Solarium\Core\Plugin\Plugin;
...
@@ -42,7 +42,6 @@ use Solarium\Core\Plugin\Plugin;
use
Solarium\QueryType\Update\Result
as
UpdateResult
;
use
Solarium\QueryType\Update\Result
as
UpdateResult
;
use
Solarium\QueryType\Update\Query\Query
as
UpdateQuery
;
use
Solarium\QueryType\Update\Query\Query
as
UpdateQuery
;
use
Solarium\QueryType\Select\Result\DocumentInterface
;
use
Solarium\QueryType\Select\Result\DocumentInterface
;
use
Solarium\QueryType\Select\Result\Document
as
ReadOnlyDocument
;
use
Solarium\Plugin\BufferedAdd\Event\Events
;
use
Solarium\Plugin\BufferedAdd\Event\Events
;
use
Solarium\Plugin\BufferedAdd\Event\PreFlush
as
PreFlushEvent
;
use
Solarium\Plugin\BufferedAdd\Event\PreFlush
as
PreFlushEvent
;
use
Solarium\Plugin\BufferedAdd\Event\PostFlush
as
PostFlushEvent
;
use
Solarium\Plugin\BufferedAdd\Event\PostFlush
as
PostFlushEvent
;
...
@@ -134,7 +133,7 @@ class BufferedAdd extends Plugin
...
@@ -134,7 +133,7 @@ class BufferedAdd extends Plugin
* Add a document
* Add a document
*
*
* @param DocumentInterface $document
* @param DocumentInterface $document
* @return self Provides fluent interface
* @return self
Provides fluent interface
*/
*/
public
function
addDocument
(
$document
)
public
function
addDocument
(
$document
)
{
{
...
...
library/Solarium/Plugin/BufferedAdd/Event/Events.php
View file @
5d9b6d5e
...
@@ -47,7 +47,7 @@ class Events
...
@@ -47,7 +47,7 @@ class Events
/**
/**
* This event is called before a buffer flush
* This event is called before a buffer flush
*
*
* The event listener receives the buffer (array).
* The event listener receives the buffer (array)
.
*
*
* @var string
* @var string
*/
*/
...
@@ -62,11 +62,10 @@ class Events
...
@@ -62,11 +62,10 @@ class Events
*/
*/
const
POST_FLUSH
=
'solarium.bufferedAdd.postFlush'
;
const
POST_FLUSH
=
'solarium.bufferedAdd.postFlush'
;
/**
/**
* This event is called before a buffer commit
* This event is called before a buffer commit
*
*
* The event listener receives the buffer (array).
* The event listener receives the buffer (array)
.
*
*
* @var string
* @var string
*/
*/
...
...
library/Solarium/Plugin/BufferedAdd/Event/PreCommit.php
View file @
5d9b6d5e
...
@@ -98,7 +98,7 @@ class PreCommit extends Event
...
@@ -98,7 +98,7 @@ class PreCommit extends Event
/**
/**
* Set the buffer for this event, this way you can alter the buffer before it is committed to Solr
* Set the buffer for this event, this way you can alter the buffer before it is committed to Solr
*
*
* @param array $buffer
* @param
array $buffer
* @return void
* @return void
*/
*/
public
function
setBuffer
(
$buffer
)
public
function
setBuffer
(
$buffer
)
...
...
library/Solarium/Plugin/BufferedAdd/Event/PreFlush.php
View file @
5d9b6d5e
...
@@ -64,9 +64,9 @@ class PreFlush extends Event
...
@@ -64,9 +64,9 @@ class PreFlush extends Event
/**
/**
* Event constructor
* Event constructor
*
*
* @param array $buffer
* @param array
$buffer
* @param boolean $overwrite
* @param boolean $overwrite
* @param int $commitWithin
* @param int
$commitWithin
*/
*/
public
function
__construct
(
$buffer
,
$overwrite
,
$commitWithin
)
public
function
__construct
(
$buffer
,
$overwrite
,
$commitWithin
)
{
{
...
@@ -88,7 +88,7 @@ class PreFlush extends Event
...
@@ -88,7 +88,7 @@ class PreFlush extends Event
/**
/**
* Set the buffer for this event, this way you can alter the buffer before it is committed to Solr
* Set the buffer for this event, this way you can alter the buffer before it is committed to Solr
*
*
* @param array $buffer
* @param
array $buffer
* @return void
* @return void
*/
*/
public
function
setBuffer
(
$buffer
)
public
function
setBuffer
(
$buffer
)
...
...
library/Solarium/Plugin/CustomizeRequest/CustomizeRequest.php
View file @
5d9b6d5e
...
@@ -38,7 +38,6 @@
...
@@ -38,7 +38,6 @@
*/
*/
namespace
Solarium\Plugin\CustomizeRequest
;
namespace
Solarium\Plugin\CustomizeRequest
;
use
Solarium\Core\Plugin\Plugin
;
use
Solarium\Core\Plugin\Plugin
;
use
Solarium\Core\Query\Query
;
use
Solarium\Core\Client\Request
;
use
Solarium\Core\Client\Request
;
use
Solarium\Exception\InvalidArgumentException
;
use
Solarium\Exception\InvalidArgumentException
;
use
Solarium\Exception\RuntimeException
;
use
Solarium\Exception\RuntimeException
;
...
@@ -126,8 +125,8 @@ class CustomizeRequest extends Plugin
...
@@ -126,8 +125,8 @@ class CustomizeRequest extends Plugin
* Customization instance wil be created based on the options.
* Customization instance wil be created based on the options.
*
*
* @throws InvalidArgumentException
* @throws InvalidArgumentException
* @param Customization|array $customization
* @param Customization|array
$customization
* @return self Provides fluent interface
* @return self
Provides fluent interface
*/
*/
public
function
addCustomization
(
$customization
)
public
function
addCustomization
(
$customization
)
{
{
...
...
library/Solarium/Plugin/Loadbalancer/Event/EndpointFailure.php
View file @
5d9b6d5e
...
@@ -60,7 +60,7 @@ class EndpointFailure extends Event
...
@@ -60,7 +60,7 @@ class EndpointFailure extends Event
/**
/**
* Constructor
* Constructor
*
*
* @param Endpoint $endpoint
* @param Endpoint
$endpoint
* @param HttpException $exception
* @param HttpException $exception
*/
*/
public
function
__construct
(
Endpoint
$endpoint
,
HttpException
$exception
)
public
function
__construct
(
Endpoint
$endpoint
,
HttpException
$exception
)
...
@@ -85,5 +85,4 @@ class EndpointFailure extends Event
...
@@ -85,5 +85,4 @@ class EndpointFailure extends Event
return
$this
->
exception
;
return
$this
->
exception
;
}
}
}
}
library/Solarium/Plugin/Loadbalancer/Loadbalancer.php
View file @
5d9b6d5e
...
@@ -224,9 +224,9 @@ class Loadbalancer extends Plugin
...
@@ -224,9 +224,9 @@ class Loadbalancer extends Plugin
* Add an endpoint to the loadbalacing 'pool'
* Add an endpoint to the loadbalacing 'pool'
*
*
* @throws InvalidArgumentException
* @throws InvalidArgumentException
* @param Endpoint|string $endpoint
* @param Endpoint|string
$endpoint
* @param int $weight Must be a positive number
* @param int
$weight Must be a positive number
* @return self Provides fluent interface
* @return self
Provides fluent interface
*/
*/
public
function
addEndpoint
(
$endpoint
,
$weight
=
1
)
public
function
addEndpoint
(
$endpoint
,
$weight
=
1
)
{
{
...
@@ -456,7 +456,7 @@ class Loadbalancer extends Plugin
...
@@ -456,7 +456,7 @@ class Loadbalancer extends Plugin
/**
/**
* Event hook to adjust client settings just before query execution
* Event hook to adjust client settings just before query execution
*
*
* @param PreExecuteRequestEvent
$event
* @param PreExecuteRequestEvent $event
*/
*/
public
function
preExecuteRequest
(
PreExecuteRequestEvent
$event
)
public
function
preExecuteRequest
(
PreExecuteRequestEvent
$event
)
{
{
...
...
library/Solarium/Plugin/Loadbalancer/WeightedRandomChoice.php
View file @
5d9b6d5e
...
@@ -73,7 +73,7 @@ class WeightedRandomChoice
...
@@ -73,7 +73,7 @@ class WeightedRandomChoice
* Constructor
* Constructor
*
*
* @throws InvalidArgumentException
* @throws InvalidArgumentException
* @param
array
$choices
* @param
array
$choices
*/
*/
public
function
__construct
(
$choices
)
public
function
__construct
(
$choices
)
{
{
...
@@ -95,7 +95,7 @@ class WeightedRandomChoice
...
@@ -95,7 +95,7 @@ class WeightedRandomChoice
* Get a (weighted) random entry
* Get a (weighted) random entry
*
*
* @throws RuntimeException
* @throws RuntimeException
* @param array $excludes Keys to exclude
* @param array
$excludes Keys to exclude
* @return string
* @return string
*/
*/
public
function
getRandom
(
$excludes
=
array
())
public
function
getRandom
(
$excludes
=
array
())
...
@@ -128,7 +128,7 @@ class WeightedRandomChoice
...
@@ -128,7 +128,7 @@ class WeightedRandomChoice
$high
=
count
(
$this
->
lookup
)
-
1
;
$high
=
count
(
$this
->
lookup
)
-
1
;
$low
=
0
;
$low
=
0
;
while
(
$low
<
$high
)
{
while
(
$low
<
$high
)
{
$probe
=
(
int
)
((
$high
+
$low
)
/
2
);
$probe
=
(
int
)
((
$high
+
$low
)
/
2
);
if
(
$this
->
lookup
[
$probe
]
<
$random
)
{
if
(
$this
->
lookup
[
$probe
]
<
$random
)
{
$low
=
$probe
+
1
;
$low
=
$probe
+
1
;
...
...
library/Solarium/Plugin/ParallelExecution/Event/ExecuteStart.php
View file @
5d9b6d5e
...
@@ -38,7 +38,6 @@
...
@@ -38,7 +38,6 @@
*/
*/
namespace
Solarium\Plugin\ParallelExecution\Event
;
namespace
Solarium\Plugin\ParallelExecution\Event
;
use
Symfony\Component\EventDispatcher\Event
;
use
Symfony\Component\EventDispatcher\Event
;
use
Solarium\QueryType\Update\Result
;
/**
/**
* ExecuteStart event, see Events for details
* ExecuteStart event, see Events for details
...
...
library/Solarium/QueryType/Analysis/Query/Document.php
View file @
5d9b6d5e
...
@@ -113,7 +113,7 @@ class Document extends Query
...
@@ -113,7 +113,7 @@ class Document extends Query
* Add multiple documents
* Add multiple documents
*
*
* @param DocumentInterface[] $documents
* @param DocumentInterface[] $documents
* @return self fluent interface
* @return self
fluent interface
*/
*/
public
function
addDocuments
(
$documents
)
public
function
addDocuments
(
$documents
)
{
{
...
...
library/Solarium/QueryType/Analysis/ResponseParser/Document.php
View file @
5d9b6d5e
...
@@ -37,7 +37,6 @@
...
@@ -37,7 +37,6 @@
* @namespace
* @namespace
*/
*/
namespace
Solarium\QueryType\Analysis\ResponseParser
;
namespace
Solarium\QueryType\Analysis\ResponseParser
;
use
Solarium\QueryType\Analysis\Result
as
AnalysisResult
;
use
Solarium\QueryType\Analysis\Result\ResultList
;
use
Solarium\QueryType\Analysis\Result\ResultList
;
/**
/**
...
@@ -49,8 +48,8 @@ class Document extends Field
...
@@ -49,8 +48,8 @@ class Document extends Field
/**
/**
* Parse implementation
* Parse implementation
*
*
* @param array $result
* @param array
$result
* @param array $data
* @param array
$data
* @return ResultList[]
* @return ResultList[]
*/
*/
protected
function
parseAnalysis
(
$result
,
$data
)
protected
function
parseAnalysis
(
$result
,
$data
)
...
...
library/Solarium/QueryType/Analysis/ResponseParser/Field.php
View file @
5d9b6d5e
...
@@ -73,8 +73,8 @@ class Field extends ResponseParserAbstract implements ResponseParserInterface
...
@@ -73,8 +73,8 @@ class Field extends ResponseParserAbstract implements ResponseParserInterface
/**
/**
* Parser
* Parser
*
*
* @param Result $result
* @param Result
$result
* @param array $data
* @param array
$data
* @return Types[]
* @return Types[]
*/
*/
protected
function
parseAnalysis
(
$result
,
$data
)
protected
function
parseAnalysis
(
$result
,
$data
)
...
@@ -91,8 +91,8 @@ class Field extends ResponseParserAbstract implements ResponseParserInterface
...
@@ -91,8 +91,8 @@ class Field extends ResponseParserAbstract implements ResponseParserInterface
/**
/**
* Parse analysis types and items
* Parse analysis types and items
*
*
* @param Result $result
* @param Result
$result
* @param array $typeData
* @param array
$typeData
* @return Types[]
* @return Types[]
*/
*/
protected
function
parseTypes
(
$result
,
$typeData
)
protected
function
parseTypes
(
$result
,
$typeData
)
...
@@ -102,8 +102,6 @@ class Field extends ResponseParserAbstract implements ResponseParserInterface
...
@@ -102,8 +102,6 @@ class Field extends ResponseParserAbstract implements ResponseParserInterface
$results
=
array
();
$results
=
array
();
foreach
(
$typeData
as
$fieldKey
=>
$fieldData
)
{
foreach
(
$typeData
as
$fieldKey
=>
$fieldData
)
{
$types
=
array
();
$types
=
array
();
foreach
(
$fieldData
as
$typeKey
=>
$typeData
)
{
foreach
(
$fieldData
as
$typeKey
=>
$typeData
)
{
...
...
library/Solarium/QueryType/Extract/Query.php
View file @
5d9b6d5e
...
@@ -131,7 +131,7 @@ class Query extends BaseQuery
...
@@ -131,7 +131,7 @@ class Query extends BaseQuery
* The fields in the document are indexed together with the generated
* The fields in the document are indexed together with the generated
* fields that Solr extracts from the file.
* fields that Solr extracts from the file.
*
*
* @param Document $document
* @param
Document $document
* @return self
* @return self
*/
*/
public
function
setDocument
(
$document
)
public
function
setDocument
(
$document
)
...
@@ -152,7 +152,7 @@ class Query extends BaseQuery
...
@@ -152,7 +152,7 @@ class Query extends BaseQuery
/**
/**
* Set the file to upload and index
* Set the file to upload and index
*
*
* @param string $filename
* @param
string $filename
* @return self
* @return self
*/
*/
public
function
setFile
(
$filename
)
public
function
setFile
(
$filename
)
...
@@ -173,7 +173,7 @@ class Query extends BaseQuery
...
@@ -173,7 +173,7 @@ class Query extends BaseQuery
/**
/**
* Set the prefix for fields that are not defined in the schema
* Set the prefix for fields that are not defined in the schema
*
*
* @param string $uprefix
* @param
string $uprefix
* @return self
* @return self
*/
*/
public
function
setUprefix
(
$uprefix
)
public
function
setUprefix
(
$uprefix
)
...
@@ -195,7 +195,7 @@ class Query extends BaseQuery
...
@@ -195,7 +195,7 @@ class Query extends BaseQuery
* Set the field to use if uprefix is not specified and a field cannot be
* Set the field to use if uprefix is not specified and a field cannot be
* determined
* determined
*
*
* @param string $defaultField
* @param
string $defaultField
* @return self
* @return self
*/
*/
public
function
setDefaultField
(
$defaultField
)
public
function
setDefaultField
(
$defaultField
)
...
@@ -218,7 +218,7 @@ class Query extends BaseQuery
...
@@ -218,7 +218,7 @@ class Query extends BaseQuery
* Set if all field names should be mapped to lowercase with underscores.
* Set if all field names should be mapped to lowercase with underscores.
* For example, Content-Type would be mapped to content_type.
* For example, Content-Type would be mapped to content_type.
*
*
* @param bool $lowerNames
* @param
bool $lowerNames
* @return self
* @return self
*/
*/
public
function
setLowernames
(
$lowerNames
)
public
function
setLowernames
(
$lowerNames
)
...
@@ -239,7 +239,7 @@ class Query extends BaseQuery
...
@@ -239,7 +239,7 @@ class Query extends BaseQuery
/**
/**
* Set if the extract should be committed immediately
* Set if the extract should be committed immediately
*
*
* @param bool $commit
* @param
bool $commit
* @return self Provides fluent interface
* @return self Provides fluent interface
*/
*/
public
function
setCommit
(
$commit
)
public
function
setCommit
(
$commit
)
...
@@ -260,7 +260,7 @@ class Query extends BaseQuery
...
@@ -260,7 +260,7 @@ class Query extends BaseQuery
/**
/**
* Set milliseconds until extract update is committed. Since Solr 3.4
* Set milliseconds until extract update is committed. Since Solr 3.4
*
*
* @param
int
$commitWithin
* @param
int
$commitWithin
* @return self Provides fluent interface
* @return self Provides fluent interface
*/
*/
public
function
setCommitWithin
(
$commitWithin
)
public
function
setCommitWithin
(
$commitWithin
)
...
@@ -284,9 +284,9 @@ class Query extends BaseQuery
...
@@ -284,9 +284,9 @@ class Query extends BaseQuery
* Example: fmap.content=text will cause the content field normally
* Example: fmap.content=text will cause the content field normally
* generated by Tika to be moved to the "text" field.
* generated by Tika to be moved to the "text" field.
*
*
* @param string $fromField Original field name
* @param
string $fromField Original field name
* @param mixed|array $toField New field name
* @param
mixed|array $toField New field name
* @return self Provides fluent interface
* @return self
Provides fluent interface
*/
*/
public
function
addFieldMapping
(
$fromField
,
$toField
)
public
function
addFieldMapping
(
$fromField
,
$toField
)
{
{
...
@@ -298,8 +298,8 @@ class Query extends BaseQuery
...
@@ -298,8 +298,8 @@ class Query extends BaseQuery
/**
/**
* Add multiple field name mappings
* Add multiple field name mappings
*
*
* @param array $mappings Name mapping in the form [$fromField => $toField, ...]
* @param
array $mappings Name mapping in the form [$fromField => $toField, ...]
* @return self Provides fluent interface
* @return self
Provides fluent interface
*/
*/
public
function
addFieldMappings
(
$mappings
)
public
function
addFieldMappings
(
$mappings
)
{
{
...
@@ -313,8 +313,8 @@ class Query extends BaseQuery
...
@@ -313,8 +313,8 @@ class Query extends BaseQuery
/**
/**
* Remove a field name mapping
* Remove a field name mapping
*
*
* @param string $fromField
* @param
string $fromField
* @return self Provides fluent interface
* @return self
Provides fluent interface
*/
*/
public
function
removeFieldMapping
(
$fromField
)
public
function
removeFieldMapping
(
$fromField
)
{
{
...
@@ -333,6 +333,7 @@ class Query extends BaseQuery
...
@@ -333,6 +333,7 @@ class Query extends BaseQuery
public
function
clearFieldMappings
()
public
function
clearFieldMappings
()
{
{
$this
->
fieldMappings
=
array
();
$this
->
fieldMappings
=
array
();
return
$this
;
return
$this
;
}
}
...
@@ -349,8 +350,8 @@ class Query extends BaseQuery
...
@@ -349,8 +350,8 @@ class Query extends BaseQuery
/**
/**
* Set many field name mappings. This overwrites any existing fields.
* Set many field name mappings. This overwrites any existing fields.
*
*
* @param array $mappings Name mapping in the form [$fromField => $toField, ...]
* @param
array $mappings Name mapping in the form [$fromField => $toField, ...]
* @return self Provides fluent interface
* @return self
Provides fluent interface
*/
*/
public
function
setFieldMappings
(
$mappings
)
public
function
setFieldMappings
(
$mappings
)
{
{
...
@@ -398,6 +399,7 @@ class Query extends BaseQuery
...
@@ -398,6 +399,7 @@ class Query extends BaseQuery
public
function
createDocument
(
$fields
=
array
(),
$boosts
=
array
())
public
function
createDocument
(
$fields
=
array
(),
$boosts
=
array
())
{
{
$class
=
$this
->
getDocumentClass
();
$class
=
$this
->
getDocumentClass
();
return
new
$class
(
$fields
,
$boosts
);
return
new
$class
(
$fields
,
$boosts
);
}
}
...
...
library/Solarium/QueryType/Extract/RequestBuilder.php
View file @
5d9b6d5e
...
@@ -58,7 +58,7 @@ class RequestBuilder extends BaseRequestBuilder
...
@@ -58,7 +58,7 @@ class RequestBuilder extends BaseRequestBuilder
/**
/**
* Build the request
* Build the request
*
*
* @param
Query
$query
* @param
Query
$query
* @return Request
* @return Request
*/
*/
public
function
build
(
QueryInterface
$query
)
public
function
build
(
QueryInterface
$query
)
...
...
library/Solarium/QueryType/MoreLikeThis/Query.php
View file @
5d9b6d5e
...
@@ -183,7 +183,7 @@ class Query extends SelectQuery
...
@@ -183,7 +183,7 @@ class Query extends SelectQuery
* Separate multiple fields with commas if you use string input.
* Separate multiple fields with commas if you use string input.
*
*
* @param string|array $fields
* @param string|array $fields
* @return self Provides fluent interface
* @return self
Provides fluent interface
*/
*/
public
function
setMltFields
(
$fields
)
public
function
setMltFields
(
$fields
)
{
{
...
@@ -381,7 +381,7 @@ class Query extends SelectQuery
...
@@ -381,7 +381,7 @@ class Query extends SelectQuery
* Separate multiple fields with commas if you use string input.
* Separate multiple fields with commas if you use string input.
*
*
* @param string|array $queryFields
* @param string|array $queryFields
* @return self Provides fluent interface
* @return self
Provides fluent interface
*/
*/
public
function
setQueryFields
(
$queryFields
)
public
function
setQueryFields
(
$queryFields
)
{
{
...
...
library/Solarium/QueryType/Select/Query/Component/Component.php
View file @
5d9b6d5e
...
@@ -82,6 +82,7 @@ abstract class Component extends Configurable
...
@@ -82,6 +82,7 @@ abstract class Component extends Configurable
public
function
setQueryInstance
(
Query
$instance
)
public
function
setQueryInstance
(
Query
$instance
)
{
{
$this
->
queryInstance
=
$instance
;
$this
->
queryInstance
=
$instance
;
return
$this
;
return
$this
;
}
}
...
...
library/Solarium/QueryType/Select/Query/Component/Facet/MultiQuery.php
View file @
5d9b6d5e
...
@@ -122,8 +122,8 @@ class MultiQuery extends Facet
...
@@ -122,8 +122,8 @@ class MultiQuery extends Facet
* facetquery instance wil be created based on the options.
* facetquery instance wil be created based on the options.
*
*
* @throws InvalidArgumentException
* @throws InvalidArgumentException
* @param Query|array $facetQuery
* @param Query|array
$facetQuery
* @return self Provides fluent interface
* @return self
Provides fluent interface
*/
*/
public
function
addQuery
(
$facetQuery
)
public
function
addQuery
(
$facetQuery
)
{
{
...
...
library/Solarium/QueryType/Select/Query/Component/Facet/Range.php
View file @
5d9b6d5e
...
@@ -271,7 +271,6 @@ class Range extends Facet
...
@@ -271,7 +271,6 @@ class Range extends Facet
{
{
$other
=
$this
->
getOption
(
'other'
);
$other
=
$this
->
getOption
(
'other'
);
if
(
$other
===
null
)
$other
=
array
();
if
(
$other
===
null
)
$other
=
array
();
return
$other
;
return
$other
;
}
}
...
@@ -303,7 +302,6 @@ class Range extends Facet
...
@@ -303,7 +302,6 @@ class Range extends Facet
{
{
$include
=
$this
->
getOption
(
'include'
);
$include
=
$this
->
getOption
(
'include'
);
if
(
$include
===
null
)
$include
=
array
();
if
(
$include
===
null
)
$include
=
array
();
return
$include
;
return
$include
;
}
}
}
}
library/Solarium/QueryType/Select/Query/Component/FacetSet.php
View file @
5d9b6d5e
...
@@ -280,8 +280,8 @@ class FacetSet extends Component
...
@@ -280,8 +280,8 @@ class FacetSet extends Component
* Add a facet
* Add a facet
*
*
* @throws InvalidArgumentException
* @throws InvalidArgumentException
* @param Facet\Facet|array $facet
* @param Facet\Facet|array
$facet
* @return self Provides fluent interface
* @return self
Provides fluent interface
*/
*/
public
function
addFacet
(
$facet
)
public
function
addFacet
(
$facet
)
{
{
...
@@ -409,9 +409,9 @@ class FacetSet extends Component
...
@@ -409,9 +409,9 @@ class FacetSet extends Component
* after setting the key, by using the addFacet method.
* after setting the key, by using the addFacet method.
*
*
* @throws OutOfBoundsException
* @throws OutOfBoundsException
* @param string $type
* @param string
$type
* @param array|object|null $options
* @param array|object|null
$options
* @param boolean $add
* @param boolean
$add
* @return Facet\Facet
* @return Facet\Facet
*/
*/
public
function
createFacet
(
$type
,
$options
=
null
,
$add
=
true
)
public
function
createFacet
(
$type
,
$options
=
null
,
$add
=
true
)
...
@@ -441,8 +441,8 @@ class FacetSet extends Component
...
@@ -441,8 +441,8 @@ class FacetSet extends Component
/**
/**
* Get a facet field instance
* Get a facet field instance
*
*
* @param
mixed
$options
* @param
mixed
$options
* @param
bool
$add
* @param
bool
$add
* @return Facet\Field
* @return Facet\Field
*/
*/
public
function
createFacetField
(
$options
=
null
,
$add
=
true
)
public
function
createFacetField
(
$options
=
null
,
$add
=
true
)
...
@@ -453,8 +453,8 @@ class FacetSet extends Component
...
@@ -453,8 +453,8 @@ class FacetSet extends Component
/**
/**
* Get a facet query instance
* Get a facet query instance
*
*
* @param
mixed
$options
* @param
mixed
$options
* @param
bool
$add
* @param
bool
$add
* @return Facet\Query
* @return Facet\Query
*/
*/
public
function
createFacetQuery
(
$options
=
null
,
$add
=
true
)
public
function
createFacetQuery
(
$options
=
null
,
$add
=
true
)
...
@@ -465,8 +465,8 @@ class FacetSet extends Component
...
@@ -465,8 +465,8 @@ class FacetSet extends Component
/**
/**
* Get a facet multiquery instance
* Get a facet multiquery instance
*
*
* @param
mixed
$options
* @param
mixed
$options
* @param
bool
$add
* @param
bool
$add
* @return Facet\MultiQuery
* @return Facet\MultiQuery
*/
*/
public
function
createFacetMultiQuery
(
$options
=
null
,
$add
=
true
)
public
function
createFacetMultiQuery
(
$options
=
null
,
$add
=
true
)
...
@@ -477,8 +477,8 @@ class FacetSet extends Component
...
@@ -477,8 +477,8 @@ class FacetSet extends Component
/**
/**
* Get a facet range instance
* Get a facet range instance
*
*
* @param
mixed
$options
* @param
mixed
$options
* @param
bool
$add
* @param
bool
$add
* @return Facet\Range
* @return Facet\Range
*/
*/
public
function
createFacetRange
(
$options
=
null
,
$add
=
true
)
public
function
createFacetRange
(
$options
=
null
,
$add
=
true
)
...
...
library/Solarium/QueryType/Select/Query/Component/Grouping.php
View file @
5d9b6d5e
...
@@ -447,7 +447,7 @@ class Grouping extends Component
...
@@ -447,7 +447,7 @@ class Grouping extends Component
* Group based on the unique values of a function query. Only available in Solr 4.0+
* Group based on the unique values of a function query. Only available in Solr 4.0+
*
*
* @param string $value
* @param string $value
* @return self
Provides fluent interface
* @return self Provides fluent interface
*/
*/
public
function
setFunction
(
$value
)
public
function
setFunction
(
$value
)
{
{
...
@@ -471,7 +471,7 @@ class Grouping extends Component
...
@@ -471,7 +471,7 @@ class Grouping extends Component
* This parameter only is supported on Solr 4.0+
* This parameter only is supported on Solr 4.0+
*
*
* @param string $value
* @param string $value
* @return self
Provides fluent interface
* @return self Provides fluent interface
*/
*/
public
function
setFacet
(
$value
)
public
function
setFacet
(
$value
)
{
{
...
@@ -495,7 +495,7 @@ class Grouping extends Component
...
@@ -495,7 +495,7 @@ class Grouping extends Component
* The start and rows parameters refer to numbers of documents instead of numbers of groups.
* The start and rows parameters refer to numbers of documents instead of numbers of groups.
*
*
* @param string $value
* @param string $value
* @return self
Provides fluent interface
* @return self Provides fluent interface
*/
*/
public
function
setFormat
(
$value
)
public
function
setFormat
(
$value
)
{
{
...
...
library/Solarium/QueryType/Select/Query/Component/Highlighting/Highlighting.php
View file @
5d9b6d5e
...
@@ -139,8 +139,8 @@ class Highlighting extends Component
...
@@ -139,8 +139,8 @@ class Highlighting extends Component
* Add a field for highlighting
* Add a field for highlighting
*
*
* @throws InvalidArgumentException
* @throws InvalidArgumentException
* @param string|array|Field $field
* @param string|array|Field
$field
* @return self Provides fluent interface
* @return self
Provides fluent interface
*/
*/
public
function
addField
(
$field
)
public
function
addField
(
$field
)
{
{
...
@@ -473,8 +473,8 @@ class Highlighting extends Component
...
@@ -473,8 +473,8 @@ class Highlighting extends Component
*
*
* Solr option h1.tag.post
* Solr option h1.tag.post
*
*
* @param string $prefix
* @param
string $prefix
* @return self Provides fluent interface
* @return self
Provides fluent interface
*/
*/
public
function
setTagPrefix
(
$prefix
)
public
function
setTagPrefix
(
$prefix
)
{
{
...
@@ -498,8 +498,8 @@ class Highlighting extends Component
...
@@ -498,8 +498,8 @@ class Highlighting extends Component
*
*
* Solr option h1.tag.post
* Solr option h1.tag.post
*
*
* @param string $postfix
* @param
string $postfix
* @return self Provides fluent interface
* @return self
Provides fluent interface
*/
*/
public
function
setTagPostfix
(
$postfix
)
public
function
setTagPostfix
(
$postfix
)
{
{
...
@@ -518,7 +518,6 @@ class Highlighting extends Component
...
@@ -518,7 +518,6 @@ class Highlighting extends Component
return
$this
->
getOption
(
'tagpostfix'
);
return
$this
->
getOption
(
'tagpostfix'
);
}
}
/**
/**
* Set fragmenter option
* Set fragmenter option
*
*
...
@@ -757,8 +756,8 @@ class Highlighting extends Component
...
@@ -757,8 +756,8 @@ class Highlighting extends Component
/**
/**
* Set MultiValuedSeparatorChar option
* Set MultiValuedSeparatorChar option
*
*
* @param string
$separator
* @param string $separator
* @return self Provides fluent interface
* @return self
Provides fluent interface
*/
*/
public
function
setMultiValuedSeparatorChar
(
$separator
)
public
function
setMultiValuedSeparatorChar
(
$separator
)
{
{
...
...
library/Solarium/QueryType/Select/Query/Component/MoreLikeThis.php
View file @
5d9b6d5e
...
@@ -88,7 +88,7 @@ class MoreLikeThis extends Component
...
@@ -88,7 +88,7 @@ class MoreLikeThis extends Component
* When using string input you can separate multiple fields with commas.
* When using string input you can separate multiple fields with commas.
*
*
* @param string|array $fields
* @param string|array $fields
* @return self Provides fluent interface
* @return self
Provides fluent interface
*/
*/
public
function
setFields
(
$fields
)
public
function
setFields
(
$fields
)
{
{
...
...
library/Solarium/QueryType/Select/Query/Component/Stats/Stats.php
View file @
5d9b6d5e
...
@@ -153,8 +153,8 @@ class Stats extends Component
...
@@ -153,8 +153,8 @@ class Stats extends Component
* field instance wil be created based on the options.
* field instance wil be created based on the options.
*
*
* @throws InvalidArgumentException
* @throws InvalidArgumentException
* @param Field|array $field
* @param Field|array
$field
* @return self Provides fluent interface
* @return self
Provides fluent interface
*/
*/
public
function
addField
(
$field
)
public
function
addField
(
$field
)
{
{
...
...
library/Solarium/QueryType/Select/Query/FilterQuery.php
View file @
5d9b6d5e
...
@@ -200,6 +200,7 @@ class FilterQuery extends Configurable
...
@@ -200,6 +200,7 @@ class FilterQuery extends Configurable
public
function
clearTags
()
public
function
clearTags
()
{
{
$this
->
tags
=
array
();
$this
->
tags
=
array
();
return
$this
;
return
$this
;
}
}
...
@@ -214,6 +215,7 @@ class FilterQuery extends Configurable
...
@@ -214,6 +215,7 @@ class FilterQuery extends Configurable
public
function
setTags
(
$tags
)
public
function
setTags
(
$tags
)
{
{
$this
->
clearTags
();
$this
->
clearTags
();
return
$this
->
addTags
(
$tags
);
return
$this
->
addTags
(
$tags
);
}
}
...
...
library/Solarium/QueryType/Select/Query/Query.php
View file @
5d9b6d5e
...
@@ -642,8 +642,8 @@ class Query extends BaseQuery
...
@@ -642,8 +642,8 @@ class Query extends BaseQuery
* filterquery instance wil be created based on the options.
* filterquery instance wil be created based on the options.
*
*
* @throws InvalidArgumentException
* @throws InvalidArgumentException
* @param FilterQuery|array $filterQuery
* @param FilterQuery|array
$filterQuery
* @return self Provides fluent interface
* @return self
Provides fluent interface
*/
*/
public
function
addFilterQuery
(
$filterQuery
)
public
function
addFilterQuery
(
$filterQuery
)
{
{
...
@@ -801,9 +801,9 @@ class Query extends BaseQuery
...
@@ -801,9 +801,9 @@ class Query extends BaseQuery
* instance if there is no registered component for the given key yet.
* instance if there is no registered component for the given key yet.
*
*
* @throws OutOfBoundsException
* @throws OutOfBoundsException
* @param string $key Use one of the constants
* @param string
$key Use one of the constants
* @param string $autoload Class to autoload if component needs to be created
* @param string
$autoload Class to autoload if component needs to be created
* @param array $config Configuration to use for autoload
* @param array
$config Configuration to use for autoload
* @return object|null
* @return object|null
*/
*/
public
function
getComponent
(
$key
,
$autoload
=
false
,
$config
=
null
)
public
function
getComponent
(
$key
,
$autoload
=
false
,
$config
=
null
)
...
@@ -834,9 +834,9 @@ class Query extends BaseQuery
...
@@ -834,9 +834,9 @@ class Query extends BaseQuery
*
*
* This overwrites any existing component registered with the same key.
* This overwrites any existing component registered with the same key.
*
*
* @param string
$key
* @param string $key
* @param Component $component
* @param Component $component
* @return self
Provides fluent interface
* @return self Provides fluent interface
*/
*/
public
function
setComponent
(
$key
,
$component
)
public
function
setComponent
(
$key
,
$component
)
{
{
...
@@ -1081,6 +1081,7 @@ class Query extends BaseQuery
...
@@ -1081,6 +1081,7 @@ class Query extends BaseQuery
public
function
setTags
(
$tags
)
public
function
setTags
(
$tags
)
{
{
$this
->
clearTags
();
$this
->
clearTags
();
return
$this
->
addTags
(
$tags
);
return
$this
->
addTags
(
$tags
);
}
}
...
...
library/Solarium/QueryType/Select/RequestBuilder/Component/ComponentRequestBuilderInterface.php
View file @
5d9b6d5e
...
@@ -47,7 +47,7 @@ interface ComponentRequestBuilderInterface
...
@@ -47,7 +47,7 @@ interface ComponentRequestBuilderInterface
* Add request settings for the debug component
* Add request settings for the debug component
*
*
* @param Component $component
* @param Component $component
* @param Request
$request
* @param Request $request
* @return Request
* @return Request
*/
*/
public
function
buildComponent
(
$component
,
$request
);
public
function
buildComponent
(
$component
,
$request
);
...
...
library/Solarium/QueryType/Select/RequestBuilder/Component/FacetSet.php
View file @
5d9b6d5e
...
@@ -56,8 +56,8 @@ class FacetSet extends RequestBuilder implements ComponentRequestBuilderInterfac
...
@@ -56,8 +56,8 @@ class FacetSet extends RequestBuilder implements ComponentRequestBuilderInterfac
* Add request settings for FacetSet
* Add request settings for FacetSet
*
*
* @throws UnexpectedValueException
* @throws UnexpectedValueException
* @param FacetsetComponent $component
* @param FacetsetComponent
$component
* @param Request $request
* @param Request
$request
* @return Request
* @return Request
*/
*/
public
function
buildComponent
(
$component
,
$request
)
public
function
buildComponent
(
$component
,
$request
)
...
...
library/Solarium/QueryType/Select/ResponseParser/Component/ComponentParserInterface.php
View file @
5d9b6d5e
...
@@ -45,9 +45,9 @@ interface ComponentParserInterface
...
@@ -45,9 +45,9 @@ interface ComponentParserInterface
/**
/**
* Parse result data into result objects
* Parse result data into result objects
*
*
* @param Query
$query
* @param Query $query
* @param object
$component
* @param object $component
* @param array
$data
* @param array $data
* @return object|null
* @return object|null
*/
*/
public
function
parse
(
$query
,
$component
,
$data
);
public
function
parse
(
$query
,
$component
,
$data
);
...
...
library/Solarium/QueryType/Select/ResponseParser/Component/Debug.php
View file @
5d9b6d5e
...
@@ -55,9 +55,9 @@ class Debug implements ComponentParserInterface
...
@@ -55,9 +55,9 @@ class Debug implements ComponentParserInterface
/**
/**
* Parse result data into result objects
* Parse result data into result objects
*
*
* @param Query
$query
* @param Query $query
* @param DebugComponent
$component
* @param DebugComponent $component
* @param array
$data
* @param array $data
* @return Result|null
* @return Result|null
*/
*/
public
function
parse
(
$query
,
$component
,
$data
)
public
function
parse
(
$query
,
$component
,
$data
)
...
@@ -124,7 +124,7 @@ class Debug implements ComponentParserInterface
...
@@ -124,7 +124,7 @@ class Debug implements ComponentParserInterface
*
*
* Used for explain and explainOther
* Used for explain and explainOther
*
*
* @param array
$data
* @param array $data
* @return DocumentSet
* @return DocumentSet
*/
*/
protected
function
parseDocumentSet
(
$data
)
protected
function
parseDocumentSet
(
$data
)
...
@@ -158,8 +158,8 @@ class Debug implements ComponentParserInterface
...
@@ -158,8 +158,8 @@ class Debug implements ComponentParserInterface
/**
/**
* Parse raw timing phase data into a result class
* Parse raw timing phase data into a result class
*
*
* @param string
$name
* @param string $name
* @param array
$data
* @param array $data
* @return TimingPhase
* @return TimingPhase
*/
*/
protected
function
parseTimingPhase
(
$name
,
$data
)
protected
function
parseTimingPhase
(
$name
,
$data
)
...
...
library/Solarium/QueryType/Select/ResponseParser/Component/FacetSet.php
View file @
5d9b6d5e
...
@@ -61,9 +61,9 @@ class FacetSet extends ResponseParserAbstract implements ComponentParserInterfac
...
@@ -61,9 +61,9 @@ class FacetSet extends ResponseParserAbstract implements ComponentParserInterfac
* Parse result data into result objects
* Parse result data into result objects
*
*
* @throws RuntimeException
* @throws RuntimeException
* @param Query $query
* @param Query
$query
* @param QueryFacetSet $facetSet
* @param QueryFacetSet
$facetSet
* @param array $data
* @param array
$data
* @return ResultFacetSet
* @return ResultFacetSet
*/
*/
public
function
parse
(
$query
,
$facetSet
,
$data
)
public
function
parse
(
$query
,
$facetSet
,
$data
)
...
@@ -109,9 +109,9 @@ class FacetSet extends ResponseParserAbstract implements ComponentParserInterfac
...
@@ -109,9 +109,9 @@ class FacetSet extends ResponseParserAbstract implements ComponentParserInterfac
/**
/**
* Add a facet result for a field facet
* Add a facet result for a field facet
*
*
* @param Query
$query
* @param Query $query
* @param QueryFacetField $facet
* @param QueryFacetField $facet
* @param array
$data
* @param array $data
* @return ResultFacetField
* @return ResultFacetField
*/
*/
protected
function
facetField
(
$query
,
$facet
,
$data
)
protected
function
facetField
(
$query
,
$facet
,
$data
)
...
@@ -131,7 +131,7 @@ class FacetSet extends ResponseParserAbstract implements ComponentParserInterfac
...
@@ -131,7 +131,7 @@ class FacetSet extends ResponseParserAbstract implements ComponentParserInterfac
* Add a facet result for a facet query
* Add a facet result for a facet query
*
*
* @param QueryFacetQuery $facet
* @param QueryFacetQuery $facet
* @param array
$data
* @param array $data
* @return ResultFacetQuery
* @return ResultFacetQuery
*/
*/
protected
function
facetQuery
(
$facet
,
$data
)
protected
function
facetQuery
(
$facet
,
$data
)
...
@@ -149,7 +149,7 @@ class FacetSet extends ResponseParserAbstract implements ComponentParserInterfac
...
@@ -149,7 +149,7 @@ class FacetSet extends ResponseParserAbstract implements ComponentParserInterfac
* Add a facet result for a multiquery facet
* Add a facet result for a multiquery facet
*
*
* @param QueryFacetMultiQuery $facet
* @param QueryFacetMultiQuery $facet
* @param array
$data
* @param array $data
* @return ResultFacetMultiQuery
* @return ResultFacetMultiQuery
*/
*/
protected
function
facetMultiQuery
(
$facet
,
$data
)
protected
function
facetMultiQuery
(
$facet
,
$data
)
...
@@ -171,9 +171,9 @@ class FacetSet extends ResponseParserAbstract implements ComponentParserInterfac
...
@@ -171,9 +171,9 @@ class FacetSet extends ResponseParserAbstract implements ComponentParserInterfac
/**
/**
* Add a facet result for a range facet
* Add a facet result for a range facet
*
*
* @param Query
$query
* @param Query $query
* @param QueryFacetRange $facet
* @param QueryFacetRange $facet
* @param array
$data
* @param array $data
* @return ResultFacetRange
* @return ResultFacetRange
*/
*/
protected
function
facetRange
(
$query
,
$facet
,
$data
)
protected
function
facetRange
(
$query
,
$facet
,
$data
)
...
...
library/Solarium/QueryType/Select/ResponseParser/Component/Grouping.php
View file @
5d9b6d5e
...
@@ -53,9 +53,9 @@ class Grouping implements ComponentParserInterface
...
@@ -53,9 +53,9 @@ class Grouping implements ComponentParserInterface
/**
/**
* Parse result data into result objects
* Parse result data into result objects
*
*
* @param Query
$query
* @param Query $query
* @param GroupingComponent
$grouping
* @param GroupingComponent $grouping
* @param array
$data
* @param array $data
* @return Result
* @return Result
*/
*/
public
function
parse
(
$query
,
$grouping
,
$data
)
public
function
parse
(
$query
,
$grouping
,
$data
)
...
...
library/Solarium/QueryType/Select/ResponseParser/Component/Highlighting.php
View file @
5d9b6d5e
...
@@ -51,9 +51,9 @@ class Highlighting implements ComponentParserInterface
...
@@ -51,9 +51,9 @@ class Highlighting implements ComponentParserInterface
/**
/**
* Parse result data into result objects
* Parse result data into result objects
*
*
* @param Query
$query
* @param Query $query
* @param HighlightingComponent
$highlighting
* @param HighlightingComponent $highlighting
* @param array
$data
* @param array $data
* @return HighlightingResult
* @return HighlightingResult
*/
*/
public
function
parse
(
$query
,
$highlighting
,
$data
)
public
function
parse
(
$query
,
$highlighting
,
$data
)
...
...
library/Solarium/QueryType/Select/ResponseParser/Component/MoreLikeThis.php
View file @
5d9b6d5e
...
@@ -51,9 +51,9 @@ class MoreLikeThis implements ComponentParserInterface
...
@@ -51,9 +51,9 @@ class MoreLikeThis implements ComponentParserInterface
/**
/**
* Parse result data into result objects
* Parse result data into result objects
*
*
* @param Query
$query
* @param Query $query
* @param MoreLikeThisComponent
$moreLikeThis
* @param MoreLikeThisComponent $moreLikeThis
* @param array
$data
* @param array $data
* @return MoreLikeThis
* @return MoreLikeThis
*/
*/
public
function
parse
(
$query
,
$moreLikeThis
,
$data
)
public
function
parse
(
$query
,
$moreLikeThis
,
$data
)
...
...
library/Solarium/QueryType/Select/ResponseParser/Component/Spellcheck.php
View file @
5d9b6d5e
...
@@ -55,9 +55,9 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
...
@@ -55,9 +55,9 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
/**
/**
* Parse result data into result objects
* Parse result data into result objects
*
*
* @param Query
$query
* @param Query $query
* @param SpellcheckComponent
$spellcheck
* @param SpellcheckComponent $spellcheck
* @param array
$data
* @param array $data
* @return Result|null
* @return Result|null
*/
*/
public
function
parse
(
$query
,
$spellcheck
,
$data
)
public
function
parse
(
$query
,
$spellcheck
,
$data
)
...
@@ -84,11 +84,11 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
...
@@ -84,11 +84,11 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
$correctlySpelled
=
$value
;
$correctlySpelled
=
$value
;
break
;
break
;
case
'collation'
:
case
'collation'
:
if
(
!
array_key_exists
(
'collation'
,
$value
))
{
if
(
!
array_key_exists
(
'collation'
,
$value
))
{
foreach
(
$value
as
$collationValue
)
{
foreach
(
$value
as
$collationValue
)
{
$collations
[]
=
$this
->
parseCollation
(
$query
,
$collationValue
);
$collations
[]
=
$this
->
parseCollation
(
$query
,
$collationValue
);
}
}
}
else
{
}
else
{
$collations
[]
=
$this
->
parseCollation
(
$query
,
$value
);
$collations
[]
=
$this
->
parseCollation
(
$query
,
$value
);
}
}
break
;
break
;
...
@@ -106,14 +106,13 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
...
@@ -106,14 +106,13 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
/**
/**
* Parse collation data into a result object
* Parse collation data into a result object
*
*
* @param Query
$queryObject
* @param Query $queryObject
* @param array
$values
* @param array $values
* @return Collation
* @return Collation
*/
*/
protected
function
parseCollation
(
$queryObject
,
$values
)
protected
function
parseCollation
(
$queryObject
,
$values
)
{
{
if
(
is_string
(
$values
))
{
if
(
is_string
(
$values
))
{
return
new
Collation
(
$values
,
null
,
array
());
return
new
Collation
(
$values
,
null
,
array
());
}
else
{
}
else
{
...
@@ -126,7 +125,7 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
...
@@ -126,7 +125,7 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
$values
=
$this
->
convertToKeyValueArray
(
$values
);
$values
=
$this
->
convertToKeyValueArray
(
$values
);
}
}
foreach
(
$values
as
$key
=>
$value
)
{
foreach
(
$values
as
$key
=>
$value
)
{
switch
(
$key
)
{
switch
(
$key
)
{
case
'collationQuery'
:
case
'collationQuery'
:
$query
=
$value
;
$query
=
$value
;
...
@@ -159,8 +158,8 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
...
@@ -159,8 +158,8 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
/**
/**
* Parse suggestion data into a result object
* Parse suggestion data into a result object
*
*
* @param string
$key
* @param string $key
* @param array
$value
* @param array $value
* @return Suggestion
* @return Suggestion
*/
*/
protected
function
parseSuggestion
(
$key
,
$value
)
protected
function
parseSuggestion
(
$key
,
$value
)
...
...
library/Solarium/QueryType/Select/ResponseParser/ResponseParser.php
View file @
5d9b6d5e
...
@@ -53,7 +53,7 @@ class ResponseParser extends ResponseParserAbstract implements ResponseParserInt
...
@@ -53,7 +53,7 @@ class ResponseParser extends ResponseParserAbstract implements ResponseParserInt
* Get result data for the response
* Get result data for the response
*
*
* @throws RuntimeException
* @throws RuntimeException
* @param Result $result
* @param Result
$result
* @return array
* @return array
*/
*/
public
function
parse
(
$result
)
public
function
parse
(
$result
)
...
...
library/Solarium/QueryType/Select/Result/Document.php
View file @
5d9b6d5e
...
@@ -72,8 +72,8 @@ class Document extends AbstractDocument implements DocumentInterface
...
@@ -72,8 +72,8 @@ class Document extends AbstractDocument implements DocumentInterface
* is a readonly document an exception will be thrown to prevent this.
* is a readonly document an exception will be thrown to prevent this.
*
*
* @throws RuntimeException
* @throws RuntimeException
* @param string $name
* @param string
$name
* @param string $value
* @param string
$value
* @return void
* @return void
*/
*/
public
function
__set
(
$name
,
$value
)
public
function
__set
(
$name
,
$value
)
...
...
library/Solarium/QueryType/Terms/Query.php
View file @
5d9b6d5e
...
@@ -100,7 +100,7 @@ class Query extends BaseQuery
...
@@ -100,7 +100,7 @@ class Query extends BaseQuery
* For multiple fields use a comma-separated string or array
* For multiple fields use a comma-separated string or array
*
*
* @param string|array $value
* @param string|array $value
* @return self Provides fluent interface
* @return self
Provides fluent interface
*/
*/
public
function
setFields
(
$value
)
public
function
setFields
(
$value
)
{
{
...
@@ -121,7 +121,6 @@ class Query extends BaseQuery
...
@@ -121,7 +121,6 @@ class Query extends BaseQuery
{
{
$value
=
$this
->
getOption
(
'fields'
);
$value
=
$this
->
getOption
(
'fields'
);
if
(
$value
===
null
)
$value
=
array
();
if
(
$value
===
null
)
$value
=
array
();
return
$value
;
return
$value
;
}
}
...
@@ -257,7 +256,7 @@ class Query extends BaseQuery
...
@@ -257,7 +256,7 @@ class Query extends BaseQuery
* Use a comma-separated string or array for multiple entries
* Use a comma-separated string or array for multiple entries
*
*
* @param string|array $value
* @param string|array $value
* @return self Provides fluent interface
* @return self
Provides fluent interface
*/
*/
public
function
setRegexFlags
(
$value
)
public
function
setRegexFlags
(
$value
)
{
{
...
@@ -278,7 +277,6 @@ class Query extends BaseQuery
...
@@ -278,7 +277,6 @@ class Query extends BaseQuery
{
{
$value
=
$this
->
getOption
(
'regexflags'
);
$value
=
$this
->
getOption
(
'regexflags'
);
if
(
$value
===
null
)
$value
=
array
();
if
(
$value
===
null
)
$value
=
array
();
return
$value
;
return
$value
;
}
}
...
...
library/Solarium/QueryType/Terms/ResponseParser.php
View file @
5d9b6d5e
...
@@ -51,7 +51,7 @@ class ResponseParser extends ResponseParserAbstract implements ResponseParserInt
...
@@ -51,7 +51,7 @@ class ResponseParser extends ResponseParserAbstract implements ResponseParserInt
/**
/**
* Get result data for the response
* Get result data for the response
*
*
* @param Result $result
* @param
Result $result
* @return array
* @return array
*/
*/
public
function
parse
(
$result
)
public
function
parse
(
$result
)
...
...
library/Solarium/QueryType/Update/Query/Command/Add.php
View file @
5d9b6d5e
...
@@ -70,8 +70,8 @@ class Add extends Command
...
@@ -70,8 +70,8 @@ class Add extends Command
* Add a single document
* Add a single document
*
*
* @throws RuntimeException
* @throws RuntimeException
* @param Document $document
* @param Document
$document
* @return self
Provides fluent interface
* @return self Provides fluent interface
*/
*/
public
function
addDocument
(
$document
)
public
function
addDocument
(
$document
)
{
{
...
...
library/Solarium/QueryType/Update/Query/Query.php
View file @
5d9b6d5e
...
@@ -182,8 +182,8 @@ class Query extends BaseQuery
...
@@ -182,8 +182,8 @@ class Query extends BaseQuery
* Create a command instance
* Create a command instance
*
*
* @throws InvalidArgumentException
* @throws InvalidArgumentException
* @param string $type
* @param string
$type
* @param mixed $options
* @param mixed
$options
* @return Command
* @return Command
*/
*/
public
function
createCommand
(
$type
,
$options
=
null
)
public
function
createCommand
(
$type
,
$options
=
null
)
...
...
library/Solarium/QueryType/Update/RequestBuilder.php
View file @
5d9b6d5e
...
@@ -70,7 +70,7 @@ class RequestBuilder extends BaseRequestBuilder
...
@@ -70,7 +70,7 @@ class RequestBuilder extends BaseRequestBuilder
*
*
* Each commandtype is delegated to a separate builder method.
* Each commandtype is delegated to a separate builder method.
*
*
* @param UpdateQuery $query
* @param UpdateQuery
$query
* @throws RuntimeException
* @throws RuntimeException
* @return string
* @return string
*/
*/
...
...
library/Solarium/QueryType/Update/ResponseParser.php
View file @
5d9b6d5e
...
@@ -55,6 +55,7 @@ class ResponseParser extends ResponseParserAbstract implements ResponseParserInt
...
@@ -55,6 +55,7 @@ class ResponseParser extends ResponseParserAbstract implements ResponseParserInt
public
function
parse
(
$result
)
public
function
parse
(
$result
)
{
{
$data
=
$result
->
getData
();
$data
=
$result
->
getData
();
return
$this
->
addHeaderInfo
(
$data
,
array
());
return
$this
->
addHeaderInfo
(
$data
,
array
());
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment