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