sfBrowserBase is the base class for sfBrowser.
Method Summary
-
back()
Go back in the browser history stack.
-
call($uri, $method = 'get', $parameters = array(), $changeStack = true)
Calls a request to a uri.
-
boolean
checkCurrentExceptionIsEmpty()
Test for an uncaught exception.
-
clearCookies()
Clears all cookies.
-
click($name, $arguments = array(), $options = array())
Simulates a click on a link or button.
-
deselect($name)
Simulates deselecting a checkbox or radiobutton.
-
doCall()
Calls a request to a uri.
-
array
doClick($name, $arguments = array(), $options = array())
Simulates a click on a link or button.
-
doSelect($name, $selected)
Simulates selecting a checkbox or radiobutton.
-
string
fixUri($uri)
Fixes uri removing # declarations and front controller.
-
followRedirect()
Follow redirects?
-
forward()
Go forward in the browser history stack.
-
get($uri, $parameters = array(), $changeStack = true)
Gets a uri.
-
Exception
getCurrentException()
Gets the current exception.
-
getRequest()
Gets request.
-
getResponse()
Gets response.
-
getResponseDom()
Get response dom.
-
getResponseDomCssSelector()
Get response dom css selector.
-
getUser()
Gets user.
-
initialize($hostname = null, $remote = null, $options = array())
Initializes sfBrowser - sets up environment
-
newSession()
Creates a new session in the browser.
-
parseArgumentAsArray($name, $value, &$vars, $vars)
Parses arguments as array
-
post($uri, $parameters = array(), $changeStack = true)
Posts a uri.
-
reload()
Reload the current browser.
-
removeCookie($name)
Removes a cookie by name.
-
resetCurrentException()
Resets the current exception.
-
restart()
Reset browser to original state
-
select($name)
Simulates selecting a checkbox or radiobutton.
-
setAuth($username, $password)
Sets username and password for simulating http authentication.
-
setCookie($name, $value, $expire = null, $path = '/', $domain = '', $secure = false, $httpOnly = false)
Sets a cookie.
-
setCurrentException($exception)
Sets the current exception.
-
setField($name, $value)
Sets a form field in the browser.
-
setHttpHeader($header, $value)
Sets a HTTP header for the very next request.
-
setVar($name, $value)
Sets variable name
-
shutdown()
Shutdown function to clean up and remove sessions
-
__construct($hostname = null, $remote = null, $options = array())
Class constructor.
Method Details
-
Go back in the browser history stack.
-
call ($uri, $method = 'get', $parameters = array(), $changeStack = true)
Browse code
| $uri |
The URI to fetch
|
| $method |
The request method
|
| $parameters |
The Request parameters
|
| $changeStack |
Change the browser history stack?
|
Calls a request to a uri.
-
(boolean) checkCurrentExceptionIsEmpty ()
Browse code
Test for an uncaught exception.
-
Clears all cookies.
returns This sfBrowserBase instance
-
click ($name, $arguments = array(), $options = array())
Browse code
| $name |
The link or button text
|
| $arguments |
The arguments to pass to the link
|
| $options |
An array of options
|
Simulates a click on a link or button.
-
| $name |
The checkbox or radiobutton id, name or text
|
Simulates deselecting a checkbox or radiobutton.
-
Calls a request to a uri.
-
(array) doClick ($name, $arguments = array(), $options = array())
Browse code
| $name |
The link or button text
|
| $arguments |
The arguments to pass to the link
|
| $options |
An array of options
|
Simulates a click on a link or button.
This method is called internally by the click() method. Available options: * position: The position of the linked to link if several ones have the same name (the first one is 1, not 0)
* method: The method to used instead of the form ones (useful when you need to click on a link that is converted to a form with JavaScript code)
returns An array composed of the URI, the method and the arguments to pass to the call() call
-
doSelect ($name, $selected)
Browse code
| $name |
The checkbox or radiobutton id, name or text
|
| $selected |
If true the item will be selected
|
Simulates selecting a checkbox or radiobutton.
This method is called internally by the select() and deselect() methods.
-
(string) fixUri ($uri)
Browse code
Fixes uri removing # declarations and front controller.
returns The fixed uri
-
Follow redirects?
throws sfException If request was not a redirect
-
Go forward in the browser history stack.
-
get ($uri, $parameters = array(), $changeStack = true)
Browse code
| $uri |
The URI to fetch
|
| $parameters |
The Request parameters
|
| $changeStack |
Change the browser history stack?
|
Gets a uri.
-
(Exception) getCurrentException ()
Browse code
Gets the current exception.
-
Gets request.
-
Gets response.
-
Get response dom.
-
getResponseDomCssSelector ()
Browse code
Get response dom css selector.
-
Gets user.
-
initialize ($hostname = null, $remote = null, $options = array())
Browse code
| $hostname |
Hostname to browse
|
| $remote |
Remote address to spook
|
| $options |
Options for sfBrowser
|
Initializes sfBrowser - sets up environment
-
Creates a new session in the browser.
-
parseArgumentAsArray ($name, $value, &$vars, $vars)
Browse code
| $name |
The argument name
|
| $value |
The argument value
|
| &$vars |
|
| $vars |
|
Parses arguments as array
-
post ($uri, $parameters = array(), $changeStack = true)
Browse code
| $uri |
The URI to fetch
|
| $parameters |
The Request parameters
|
| $changeStack |
Change the browser history stack?
|
Posts a uri.
-
Reload the current browser.
-
Removes a cookie by name.
returns This sfBrowserBase instance
-
resetCurrentException ()
Browse code
Resets the current exception.
-
Reset browser to original state
-
| $name |
The checkbox or radiobutton id, name or text
|
Simulates selecting a checkbox or radiobutton.
-
setAuth ($username, $password)
Browse code
| $username |
The username
|
| $password |
The password
|
Sets username and password for simulating http authentication.
-
setCookie ($name, $value, $expire = null, $path = '/', $domain = '', $secure = false, $httpOnly = false)
Browse code
| $name |
The cookie name
|
| $value |
Value for the cookie
|
| $expire |
Cookie expiration period
|
| $path |
Path
|
| $domain |
Domain name
|
| $secure |
If secure
|
| $httpOnly |
If uses only HTTP
|
Sets a cookie.
returns This sfBrowserBase instance
-
setCurrentException ($exception)
Browse code
| $exception |
An Exception instance
|
Sets the current exception.
-
setField ($name, $value)
Browse code
| $name |
The field name
|
| $value |
The field value
|
Sets a form field in the browser.
-
setHttpHeader ($header, $value)
Browse code
| $header |
The header name
|
| $value |
The header value
|
Sets a HTTP header for the very next request.
-
setVar ($name, $value)
Browse code
| $name |
The variable name
|
| $value |
The value
|
Sets variable name
-
Shutdown function to clean up and remove sessions
-
__construct ($hostname = null, $remote = null, $options = array())
Browse code
| $hostname |
Hostname to browse
|
| $remote |
Remote address to spook
|
| $options |
Options for sfBrowser
|
Class constructor.
|