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