Метод |
Описание |
|
__construct ( ) |
Starts with a fresh browser with no cookie or any other state information. |
|
addHeader ( string $header ) |
Adds a header to every fetch. |
|
ageCookies ( integer $interval ) |
Ages the cookies by the specified time. |
|
authenticate ( string $username, string $password ) : boolean |
Retries a request after setting the authentication for the current realm. |
|
back ( ) : boolean |
Equivalent to hitting the back button on the browser. |
|
clearFrameFocus ( ) |
Clears the frame focus. All frames will be searched for content. |
|
click ( string $label ) : string/boolean |
Clicks a visible text item. Will first try buttons, then links and then images. |
|
clickImage ( string $label, integer $x = 1, integer $y = 1, hash $additional = false ) : string/boolean |
Clicks the submit image by some kind of label. |
|
clickImageById ( integer/string $id, integer $x = 1, integer $y = 1, hash $additional = false ) : string/boolean |
Clicks the submit image by ID attribute. |
|
clickImageByName ( string $name, integer $x = 1, integer $y = 1, hash $additional = false ) : string/boolean |
Clicks the submit image by the name. |
|
clickLink ( string $label, integer $index ) : boolean |
Follows a link by label. |
|
clickLinkById ( string $id ) : string/boolean |
Follows a link by id attribute. |
|
clickSubmit ( string $label = 'Submit', hash $additional = false ) : string/boolean |
Clicks the submit button by label. The owning form will be submitted by this. |
|
clickSubmitById ( string $id, hash $additional = false ) : string/boolean |
Clicks the submit button by ID attribute of the button itself. The owning form will be
submitted by this. |
|
clickSubmitByName ( string $name, hash $additional = false ) : string/boolean |
Clicks the submit button by name attribute. The owning form will be submitted by this. |
|
delete ( string/SimpleUrl $url, hash/SimpleFormEncoding $parameters = false ) : string |
Sends a DELETE request and fetches the response. |
|
forward ( ) : boolean |
Equivalent to hitting the forward button on the browser. |
|
get ( string/SimpleUrl $url, hash/SimpleFormEncoding $parameters = false ) : string |
Fetches the page content with a simple GET request. |
|
getAuthentication ( ) : string |
Accessor for last Authentication type. Only valid straight after a challenge (401). |
|
getBaseUrl ( ) : string |
Accessor for base URL of page if set via BASE tag |
|
getContent ( ) : string |
Accessor for raw page information. |
|
getContentAsText ( ) : string |
Accessor for plain text version of the page. |
|
getCookieValue ( string $host, string $path, string $name ) : string |
Reads the most specific cookie value from the browser cookies. |
|
getCurrentCookieValue ( string $name ) : string |
Reads the current cookies for the current URL. |
|
getField ( string $label ) : string/boolean |
Accessor for a form element value within the page. |
|
getFieldById ( string/integer $id ) : string/boolean |
Accessor for a form element value within the page. |
|
getFieldByName ( string $name ) : string/boolean |
Accessor for a form element value within the page. Finds the first match. |
|
getFrameFocus ( ) : integer/string/boolean |
Accessor for current frame focus. Will be false if no frame has focus. |
|
getFrames ( ) : array |
Accessor for a breakdown of the frameset. |
|
getHeaders ( ) : string |
Accessor for raw header information. |
|
getLink ( string $label, integer $index ) : string/boolean |
Finds a URL by label. Will find the first link found with this link text by default,
or a later one if an index is given. The match ignores case and white space issues. |
|
getLinkById ( string $id ) : string/boolean |
Finds a link by id attribute. |
|
getMimeType ( ) : string |
Accessor for current MIME type. |
|
getRealm ( ) : string |
Accessor for last Authentication realm. Only valid straight after a challenge (401). |
|
getRequest ( ) : string |
Accessor for raw bytes sent down the wire. |
|
getResponseCode ( ) : integer |
Accessor for last response code. |
|
getTitle ( ) : string |
Accessor for parsed title. |
|
getTransportError ( ) : string |
Accessor for last error. |
|
getUrl ( ) : string |
Accessor for current URL of page or frame if focused. |
|
getUrls ( ) : array |
Accessor for a list of all links in current page. |
|
head ( string/SimpleUrl $url, hash/SimpleHeadEncoding $parameters = false ) : boolean |
Fetches the page content with a HEAD request. |
|
ignoreCookies ( ) |
Switches off cookie sending and recieving. |
|
ignoreFrames ( ) |
Disables frames support. |
|
isClickable ( string $label ) : boolean |
Tests to see if a click target exists. |
|
isImage ( string $label ) : boolean |
Tests to see if an image exists with this title or alt text. |
|
isSubmit ( string $label ) : boolean |
Tests to see if a submit button exists with this label. |
|
post ( string/SimpleUrl $url, hash/SimpleFormEncoding $parameters = false, string $content_type = false ) : string |
Fetches the page content with a POST request. |
|
put ( string/SimpleUrl $url, hash/SimpleFormEncoding $parameters = false, string $content_type = false ) : string |
Fetches the page content with a PUT request. |
|
restart ( string/integer $date = false ) |
Removes expired and temporary cookies as if the browser was closed and re-opened. |
|
retry ( ) : string/boolean |
Equivalent to hitting the retry button on the browser. |
|
setConnectionTimeout ( integer $timeout ) |
Sets the socket timeout for opening a connection. |
|
setCookie ( string $name, string $value, string $host = false, string $path = '/', string $expiry = false ) |
Sets an additional cookie. |
|
setField ( string $label, string $value, $position = false ) : boolean |
Sets all form fields with that name. |
|
setFieldById ( string/integer $id, string $value ) : boolean |
Sets all form fields with that id attribute. |
|
setFieldByName ( string $name, string $value, $position = false ) : boolean |
Sets all form fields with that name. Will use label if one is available (not yet
implemented). |
|
setFrameFocus ( string $name ) : boolean |
Sets the focus by name. |
|
setFrameFocusByIndex ( integer $choice ) : boolean |
Sets the focus by index. The integer index starts from 1. |
|
setMaximumNestedFrames ( integer $max ) |
Sets the maximum number of nesting of framed pages within a framed page to prevent loops. |
|
setMaximumRedirects ( integer $max ) |
Sets the maximum number of redirects before a page will be loaded anyway. |
|
setParser ( $parser ) |
Override the default HTML parser, allowing parsers to be plugged in. |
|
submitFormById ( string $id, $additional = false ) : string/boolean |
Submits a form by the ID. |
|
useCookies ( ) |
Switches back on the cookie sending and recieving. |
|
useFrames ( ) |
Enables frames support. Frames will be fetched from now on. |
|
useProxy ( string $proxy, string $username = false, string $password = false ) |
Sets proxy to use on all requests for when testing from behind a firewall. |
|