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
f7e6b92f
Commit
f7e6b92f
authored
Jan 11, 2012
by
stefanooldeman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix issue #56 add toString method to request
parent
154dec54
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
library/Solarium/Client/Request.php
library/Solarium/Client/Request.php
+20
-0
No files found.
library/Solarium/Client/Request.php
View file @
f7e6b92f
...
@@ -385,4 +385,24 @@ class Solarium_Client_Request extends Solarium_Configurable
...
@@ -385,4 +385,24 @@ class Solarium_Client_Request extends Solarium_Configurable
return
$queryString
;
return
$queryString
;
}
}
/**
* Magic method enables a object to be transformed to a string
*
* Get a summary showing significant variables in the object
* note: uri resource is decoded for readability
*
* @return string
*/
public
function
__toString
()
{
$output
=
__CLASS__
.
'::toString '
.
"
\n
"
.
'method: '
.
$this
->
getMethod
()
.
"
\n
"
.
'header: '
.
print_r
(
$this
->
getHeaders
(),
1
)
//don't add newline when using print_r
.
'resource: '
.
urldecode
(
$this
->
getUri
())
.
"
\n
"
.
'raw data: '
.
$this
->
getRawData
()
.
"
\n
"
;
return
$output
;
}
}
}
\ No newline at end of file
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