Class SimpleFrameset

Description

A composite page. Wraps a frameset page and adds subframes. The original page will be mostly ignored. Implements the SimplePage interface so as to be interchangeable.

Located in /libraries/pear/simpletest/frames.php (line 24)


	
			
Variable Summary
 mixed $_focus
 mixed $_frames
 mixed $_frameset
 mixed $_names
Method Summary
 SimpleFrameset SimpleFrameset (SimplePage &$page)
 void addParsedFrame (SimplePage &$page, [string $name = false])
 void clearFrameFocus ()
 array getAbsoluteUrls ()
 string getAuthentication ()
 string/boolean getField (string $name)
 string/boolean getFieldById (string/integer $id)
 SimpleForm &getFormById (string $id)
 SimpleForm &getFormByImageLabel (string $label)
 integer/string/boolean getFrameFocus ()
 boolean/array getFrames ()
 string getHeaders ()
 string getMimeType ()
 string getRaw ()
 string getRealm ()
 array getRelativeUrls ()
 string getRequest ()
 mixed getRequestData ()
 string getRequestMethod ()
 integer getResponseCode ()
 string getTitle ()
 string getTransportError ()
 string getUrlById (string $id)
 array getUrlsByLabel (string $label)
 boolean hasFrames ()
 boolean setField (string $name, string $value)
 boolean setFieldById (string/integer $id, string $value)
 boolean setFrameFocus (string $name)
 boolean setFrameFocusByIndex (integer $choice)
 SimpleForm &_findForm (string $method, string $attribute)
Variables
mixed $_focus (line 27)
mixed $_frames (line 26)
mixed $_frameset (line 25)
mixed $_names (line 28)
Methods
Constructor SimpleFrameset (line 35)

Stashes the frameset page. Will make use of the browser to fetch the sub frames recursively.

SimpleFrameset SimpleFrameset (SimplePage &$page)
addParsedFrame (line 48)

Adds a parsed page to the frameset.

  • access: public
void addParsedFrame (SimplePage &$page, [string $name = false])
  • SimplePage $page: Frame page.
  • string $name: name Name of frame in frameset.
clearFrameFocus (line 107)

Clears the frame focus.

  • access: public
void clearFrameFocus ()
getAbsoluteUrls (line 289)

Accessor for a list of all fixed links.

  • return: List of urls with scheme of http or https and hostname.
  • access: public
array getAbsoluteUrls ()
getAuthentication (line 230)

Accessor for last Authentication type. Only valid straight after a challenge (401).

  • return: Description of challenge type.
  • access: public
string getAuthentication ()
getField (line 510)

Accessor for a form element value within a frameset.

Finds the first match amongst the frames.

  • return: A string if the field is present, false if unchecked and null if missing.
  • access: public
string/boolean getField (string $name)
  • string $name: Field name.
getFieldById (line 529)

Accessor for a form element value within a page.

Finds the first match.

  • return: A string if the field is present, false if unchecked and null if missing.
  • access: public
string/boolean getFieldById (string/integer $id)
  • string/integer $id: Field ID attribute.
getFormById (line 440)

Finds a held form by the form ID. A way of

identifying a specific form when we have control of the HTML code. The first form found either within the focused frame, or across frames, will be the one returned.

  • return: Form object containing the matching ID.
  • access: public
SimpleForm &getFormById (string $id)
  • string $id: Form label.
getFormByImageId (line 426)

Finds a held form by image button id. Will only search correctly built forms. The first form found either within the focused frame, or across frames, will be the one returned.

  • return: Form object containing the image.
  • access: public
SimpleForm &getFormByImageId (string $id)
  • string $id: Image ID attribute.
getFormByImageLabel (line 400)

Finds a held form by image label. Will only search correctly built forms. The first form found either within the focused frame, or across frames, will be the one returned.

  • return: Form object containing the image.
  • access: public
SimpleForm &getFormByImageLabel (string $label)
  • string $label: Usually the alt attribute.
getFormByImageName (line 413)

Finds a held form by image button id. Will only search correctly built forms. The first form found either within the focused frame, or across frames, will be the one returned.

  • return: Form object containing the image.
  • access: public
SimpleForm &getFormByImageName (string $name)
  • string $name: Image name.
getFormBySubmitId (line 387)

Finds a held form by button id. Will only search correctly built forms. The first form found either within the focused frame, or across frames, will be the one returned.

  • return: Form object containing the button.
  • access: public
SimpleForm &getFormBySubmitId (string $id)
  • string $id: Button ID attribute.
getFormBySubmitLabel (line 361)

Finds a held form by button label. Will only search correctly built forms. The first form found either within the focused frame, or across frames, will be the one returned.

  • return: Form object containing the button.
  • access: public
SimpleForm &getFormBySubmitLabel (string $label)
  • string $label: Button label, default 'Submit'.
getFormBySubmitName (line 374)

Finds a held form by button label. Will only search correctly built forms. The first form found either within the focused frame, or across frames, will be the one returned.

  • return: Form object containing the button.
  • access: public
SimpleForm &getFormBySubmitName (string $name)
  • string $name: Button name attribute.
getFrameFocus (line 63)

Accessor for current frame focus. Will be false if no frame has focus.

  • return: Label if any, otherwise the position in the frameset or false if none.
  • access: public
integer/string/boolean getFrameFocus ()
getFrames (line 131)

Accessor for frames information.

  • return: False if no frameset or otherwise a hash of frame URLs. The key is either a numerical index or the name attribute.
  • access: public
boolean/array getFrames ()
getHeaders (line 267)

Accessor for raw header information.

  • return: Header block.
  • access: public
string getHeaders ()
getMimeType (line 205)

Accessor for current MIME type.

  • return: MIME type as string; e.g. 'text/html'
  • access: public
string getMimeType ()
getRaw (line 141)

Accessor for raw text of either all the pages or the frame in focus.

  • return: Raw unparsed content.
  • access: public
string getRaw ()
getRealm (line 243)

Accessor for last Authentication realm. Only valid straight after a challenge (401).

  • return: Name of security realm.
  • access: public
string getRealm ()
getRelativeUrls (line 305)

Accessor for a list of all relative links.

  • return: List of urls without hostname.
  • access: public
array getRelativeUrls ()
getRequest (line 255)

Accessor for outgoing header information.

  • return: Header block.
  • access: public
string getRequest ()
getRequestData (line 193)

Original request data.

  • return: Sent content.
  • access: public
mixed getRequestData ()
getRequestMethod (line 169)

Request method used to fetch this frame.

  • return: GET, POST or HEAD.
  • access: public
string getRequestMethod ()
getRequestUrl (line 181)

Original resource name.

  • return: Current url.
  • access: public
SimpleUrl getRequestUrl ()
getResponseCode (line 217)

Accessor for last response code.

  • return: Last HTTP response code received.
  • access: public
integer getResponseCode ()
getTitle (line 279)

Accessor for parsed title.

  • return: Title or false if no title is present.
  • access: public
string getTitle ()
getTransportError (line 157)

Accessor for last error.

  • return: Error from last response.
  • access: public
string getTransportError ()
getUrlById (line 343)

Accessor for a URL by the id attribute. If in a frameset then the first link found with taht ID attribute is returned only. Focus on a frame if you want one from a specific part of the frameset.

  • return: URL with that id.
  • access: public
string getUrlById (string $id)
  • string $id: Id attribute of link.
getUrlsByLabel (line 323)

Accessor for URLs by the link label. Label will match regardess of whitespace issues and case.

  • return: List of links with that label.
  • access: public
array getUrlsByLabel (string $label)
  • string $label: Text of link.
hasFrames (line 116)

Test for the presence of a frameset.

  • return: True if frameset.
  • access: public
boolean hasFrames ()
setField (line 473)

Sets a field on each form in which the field is available.

  • return: True if value is valid.
  • access: public
boolean setField (string $name, string $value)
  • string $name: Field name.
  • string $value: Value to set field to.
setFieldById (line 491)

Sets a field on the form in which the unique field is available.

  • return: True if value is valid.
  • access: public
boolean setFieldById (string/integer $id, string $value)
  • string/integer $id: Field ID attribute.
  • string $value: Value to set field to.
setFrameFocus (line 95)

Sets the focus by name.

  • return: True if frame exists.
  • access: public
boolean setFrameFocus (string $name)
  • string $name: Chosen frame.
setFrameFocusByIndex (line 81)

Sets the focus by index. The integer index starts from 1.

  • return: True if frame exists.
  • access: public
boolean setFrameFocusByIndex (integer $choice)
  • integer $choice: Chosen frame.
_findForm (line 452)

General form finder. Will serach all the frames or just the one in focus.

  • return: Form object containing the matching ID.
  • access: private
SimpleForm &_findForm (string $method, string $attribute)
  • string $method: Method to use to find in a page.
  • string $attribute: Label, name or ID.

Documentation generated on Fri, 24 Dec 2004 13:02:07 +0000 by phpDocumentor 1.3.0RC3