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
1f2d8c10
Commit
1f2d8c10
authored
Jan 24, 2012
by
Bas de Nooijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code style and docblox fixes
parent
1d4034e9
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
106 additions
and
11 deletions
+106
-11
library/Solarium/Client/Adapter/Curl.php
library/Solarium/Client/Adapter/Curl.php
+7
-0
library/Solarium/Client/RequestBuilder/Select/Component/Highlighting.php
...m/Client/RequestBuilder/Select/Component/Highlighting.php
+4
-2
library/Solarium/Plugin/BufferedAdd.php
library/Solarium/Plugin/BufferedAdd.php
+1
-1
library/Solarium/Plugin/CustomizeRequest/Customization.php
library/Solarium/Plugin/CustomizeRequest/Customization.php
+5
-1
library/Solarium/Plugin/ParallelExecution.php
library/Solarium/Plugin/ParallelExecution.php
+1
-1
library/Solarium/Plugin/PrefetchIterator.php
library/Solarium/Plugin/PrefetchIterator.php
+11
-2
library/Solarium/Query/Helper.php
library/Solarium/Query/Helper.php
+7
-3
library/Solarium/Result.php
library/Solarium/Result.php
+2
-0
library/Solarium/Result/Analysis/Item.php
library/Solarium/Result/Analysis/Item.php
+16
-0
library/Solarium/Result/Analysis/List.php
library/Solarium/Result/Analysis/List.php
+4
-0
library/Solarium/Result/Select/Debug.php
library/Solarium/Result/Select/Debug.php
+14
-0
library/Solarium/Result/Select/Debug/Detail.php
library/Solarium/Result/Select/Debug/Detail.php
+6
-0
library/Solarium/Result/Select/Debug/Document.php
library/Solarium/Result/Select/Debug/Document.php
+5
-0
library/Solarium/Result/Select/Debug/Timing.php
library/Solarium/Result/Select/Debug/Timing.php
+2
-0
library/Solarium/Result/Select/Debug/TimingPhase.php
library/Solarium/Result/Select/Debug/TimingPhase.php
+4
-0
library/Solarium/Result/Select/Spellcheck.php
library/Solarium/Result/Select/Spellcheck.php
+2
-0
library/Solarium/Result/Select/Spellcheck/Collation.php
library/Solarium/Result/Select/Spellcheck/Collation.php
+6
-0
library/Solarium/Result/Suggester.php
library/Solarium/Result/Suggester.php
+1
-1
library/Solarium/Result/Suggester/Term.php
library/Solarium/Result/Suggester/Term.php
+8
-0
No files found.
library/Solarium/Client/Adapter/Curl.php
View file @
1f2d8c10
...
...
@@ -89,6 +89,13 @@ class Solarium_Client_Adapter_Curl extends Solarium_Client_Adapter
// @codeCoverageIgnoreEnd
}
/**
* Get the response for a curl handle
*
* @param resource $handle
* @param string $httpResponse
* @return Solarium_Client_Response
*/
public
function
getResponse
(
$handle
,
$httpResponse
)
{
// @codeCoverageIgnoreStart
...
...
library/Solarium/Client/RequestBuilder/Select/Component/Highlighting.php
View file @
1f2d8c10
...
...
@@ -52,8 +52,10 @@ class Solarium_Client_RequestBuilder_Select_Component_Highlighting
* @param Solarium_Client_Request $request
* @return Solarium_Client_Request
*/
public
function
buildComponent
(
Solarium_Query_Select_Component_Highlighting
$component
,
Solarium_Client_Request
$request
)
{
public
function
buildComponent
(
Solarium_Query_Select_Component_Highlighting
$component
,
Solarium_Client_Request
$request
){
// enable highlighting
$request
->
addParam
(
'hl'
,
'true'
);
...
...
library/Solarium/Plugin/BufferedAdd.php
View file @
1f2d8c10
...
...
@@ -183,7 +183,7 @@ class Solarium_Plugin_BufferedAdd extends Solarium_Plugin_Abstract
*/
public
function
flush
(
$overwrite
=
null
,
$commitWithin
=
null
)
{
if
(
count
(
$this
->
_buffer
)
==
0
)
{
if
(
count
(
$this
->
_buffer
)
==
0
)
{
// nothing to do
return
false
;
}
...
...
library/Solarium/Plugin/CustomizeRequest/Customization.php
View file @
1f2d8c10
...
...
@@ -45,9 +45,13 @@ class Solarium_Plugin_CustomizeRequest_Customization extends Solarium_Configurab
{
/**
* Type definitions
* Type definition
for param
s
*/
const
TYPE_PARAM
=
'param'
;
/**
* Type definition for headers
*/
const
TYPE_HEADER
=
'header'
;
/**
...
...
library/Solarium/Plugin/ParallelExecution.php
View file @
1f2d8c10
...
...
@@ -68,7 +68,7 @@ class Solarium_Plugin_ParallelExecution extends Solarium_Plugin_Abstract
// create handles and add all handles to the multihandle
$multiHandle
=
curl_multi_init
();
$handles
=
array
();
foreach
(
$queries
as
$key
=>
$query
)
{
foreach
(
$queries
as
$key
=>
$query
)
{
$request
=
$this
->
_client
->
createRequest
(
$query
);
$handle
=
$adapter
->
createHandle
(
$request
);
curl_multi_add_handle
(
$multiHandle
,
$handle
);
...
...
library/Solarium/Plugin/PrefetchIterator.php
View file @
1f2d8c10
...
...
@@ -57,16 +57,22 @@ class Solarium_Plugin_PrefetchIterator extends Solarium_Plugin_Abstract implemen
);
/**
* Query instance to execute
*
* @var Solarium_Query_Select
*/
protected
$_query
;
/**
* Start position (offset)
*
* @var int
*/
protected
$_start
=
0
;
/**
* Last resultset from the query instance
*
* @var Solarium_Result_Select
*/
protected
$_result
;
...
...
@@ -79,6 +85,8 @@ class Solarium_Plugin_PrefetchIterator extends Solarium_Plugin_Abstract implemen
protected
$_position
;
/**
* Documents from the last resultset
*
* @var array
*/
protected
$_documents
;
...
...
@@ -142,11 +150,12 @@ class Solarium_Plugin_PrefetchIterator extends Solarium_Plugin_Abstract implemen
/**
* Iterator implementation
*/
function
rewind
()
{
function
rewind
()
{
$this
->
_position
=
0
;
// this condition prevent useless re-fetching of data if a count is done before the iterator is used
if
(
$this
->
_start
!==
$this
->
_options
[
'prefetch'
])
{
if
(
$this
->
_start
!==
$this
->
_options
[
'prefetch'
])
{
$this
->
_start
=
0
;
}
}
...
...
library/Solarium/Query/Helper.php
View file @
1f2d8c10
...
...
@@ -69,6 +69,9 @@ class Solarium_Query_Helper
protected
$_derefencedParamsLastKey
=
0
;
/**
* Solarium_Query instance, optional.
* Used for dereferenced params.
*
* @var Solarium_Query
*/
protected
$_query
;
...
...
@@ -78,7 +81,8 @@ class Solarium_Query_Helper
*
* @param Solarium_Query $query
*/
public
function
__construct
(
$query
=
null
)
{
public
function
__construct
(
$query
=
null
)
{
$this
->
_query
=
$query
;
}
...
...
@@ -291,14 +295,14 @@ class Solarium_Query_Helper
{
if
(
$dereferenced
)
{
if
(
!
$this
->
_query
)
{
if
(
!
$this
->
_query
)
{
throw
new
Solarium_Exception
(
'Dereferenced params can only be used in a Solarium_Query_Helper instance retrieved from the query '
.
'by using the getHelper() method, this instance was manually created'
);
}
foreach
(
$params
as
$paramKey
=>
$paramValue
)
{
foreach
(
$params
as
$paramKey
=>
$paramValue
)
{
$this
->
_derefencedParamsLastKey
++
;
$derefKey
=
'deref_'
.
$this
->
_derefencedParamsLastKey
;
$this
->
_query
->
addParam
(
$derefKey
,
$paramValue
);
...
...
library/Solarium/Result.php
View file @
1f2d8c10
...
...
@@ -72,6 +72,8 @@ class Solarium_Result
protected
$_query
;
/**
* Solarium client instance
*
* @var Solarium_Client
*/
protected
$_client
;
...
...
library/Solarium/Result/Analysis/Item.php
View file @
1f2d8c10
...
...
@@ -46,41 +46,57 @@ class Solarium_Result_Analysis_Item
{
/**
* Text string
*
* @var string
*/
protected
$_text
;
/**
* RawText string
*
* @var string
*/
protected
$_rawText
;
/**
* Start
*
* @var int
*/
protected
$_start
;
/**
* End
*
* @var int
*/
protected
$_end
;
/**
* Position
*
* @var int
*/
protected
$_position
;
/**
* Position history
*
* @var array
*/
protected
$_positionHistory
;
/**
* Type
*
* @var string
*/
protected
$_type
;
/**
* Match
*
* @var boolean
*/
protected
$_match
=
false
;
...
...
library/Solarium/Result/Analysis/List.php
View file @
1f2d8c10
...
...
@@ -46,11 +46,15 @@ class Solarium_Result_Analysis_List implements IteratorAggregate, Countable
{
/**
* List name
*
* @var string
*/
protected
$_name
;
/**
* List items
*
* @var array
*/
protected
$_items
;
...
...
library/Solarium/Result/Select/Debug.php
View file @
1f2d8c10
...
...
@@ -46,36 +46,50 @@ class Solarium_Result_Select_Debug implements IteratorAggregate, Countable
{
/**
* QueryString
*
* @var string
*/
protected
$_queryString
;
/**
* ParsedQuery
*
* @var string
*/
protected
$_parsedQuery
;
/**
* QueryParser
*
* @var string
*/
protected
$_queryParser
;
/**
* OtherQuery
*
* @var string
*/
protected
$_otherQuery
;
/**
* Explain instance
*
* @var Solarium_Result_Select_Debug_DocumentSet
*/
protected
$_explain
;
/**
* ExplainOther instance
*
* @var Solarium_Result_Select_Debug_DocumentSet
*/
protected
$_explainOther
;
/**
* Timing instance
*
* @var Solarium_Result_Select_Debug_Timing
*/
protected
$_timing
;
...
...
library/Solarium/Result/Select/Debug/Detail.php
View file @
1f2d8c10
...
...
@@ -46,16 +46,22 @@ class Solarium_Result_Select_Debug_Detail
{
/**
* Value
*
* @var float
*/
protected
$_value
;
/**
* Match
*
* @var boolean
*/
protected
$_match
;
/**
* Description
*
* @var string
*/
protected
$_description
;
...
...
library/Solarium/Result/Select/Debug/Document.php
View file @
1f2d8c10
...
...
@@ -47,11 +47,15 @@ class Solarium_Result_Select_Debug_Document extends Solarium_Result_Select_Debug
{
/**
* Key
*
* @var string
*/
protected
$_key
;
/**
* Details
*
* @var array
*/
protected
$_details
;
...
...
@@ -63,6 +67,7 @@ class Solarium_Result_Select_Debug_Document extends Solarium_Result_Select_Debug
* @param boolean $match
* @param float $value
* @param string $description
* @param array $details
*/
public
function
__construct
(
$key
,
$match
,
$value
,
$description
,
$details
)
{
...
...
library/Solarium/Result/Select/Debug/Timing.php
View file @
1f2d8c10
...
...
@@ -46,6 +46,8 @@ class Solarium_Result_Select_Debug_Timing implements IteratorAggregate, Countabl
{
/**
* Time
*
* @var float
*/
protected
$_time
;
...
...
library/Solarium/Result/Select/Debug/TimingPhase.php
View file @
1f2d8c10
...
...
@@ -47,11 +47,15 @@ class Solarium_Result_Select_Debug_TimingPhase
{
/**
* Phase name
*
* @var string
*/
protected
$_name
;
/**
* Phase time
*
* @var float
*/
protected
$_time
;
...
...
library/Solarium/Result/Select/Spellcheck.php
View file @
1f2d8c10
...
...
@@ -60,6 +60,8 @@ class Solarium_Result_Select_Spellcheck implements IteratorAggregate, Countable
protected
$_collation
;
/**
* Correctly spelled?
*
* @var boolean
*/
protected
$_correctlySpelled
;
...
...
library/Solarium/Result/Select/Spellcheck/Collation.php
View file @
1f2d8c10
...
...
@@ -46,16 +46,22 @@ class Solarium_Result_Select_Spellcheck_Collation implements IteratorAggregate,
{
/**
* Query
*
* @var string
*/
protected
$_query
;
/**
* Hit count
*
* @var int
*/
protected
$_hits
;
/**
* Corrections
*
* @var array
*/
protected
$_corrections
;
...
...
library/Solarium/Result/Suggester.php
View file @
1f2d8c10
...
...
@@ -121,7 +121,7 @@ class Solarium_Result_Suggester extends Solarium_Result_QueryType implements Ite
/**
* Get results for a specific term
*
* @param string $
field
* @param string $
term
* @return array
*/
public
function
getTerm
(
$term
)
...
...
library/Solarium/Result/Suggester/Term.php
View file @
1f2d8c10
...
...
@@ -46,21 +46,29 @@ class Solarium_Result_Suggester_Term implements IteratorAggregate, Countable
{
/**
* NumFound
*
* @var int
*/
protected
$_numFound
;
/**
* StartOffset
*
* @var int
*/
protected
$_startOffset
;
/**
* EndOffset
*
* @var int
*/
protected
$_endOffset
;
/**
* Suggestions
*
* @var array
*/
protected
$_suggestions
;
...
...
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