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 /frames.php (line 24)


	
			
Variable Summary
 mixed $_focus
 mixed $_frames
 mixed $_frameset
 mixed $_names
Method Summary
 SimpleFrameset SimpleFrameset ( &$page, SimplePage $page)
 void addFrame ( &$page, [string $name = false], SimplePage $page)
 void clearFrameFocus ()
 string getAuthentication ()
 string/boolean getField (SimpleSelector $selector)
 SimpleForm &getFormById (string $id)
 SimpleForm &getFormByImage (SimpleSelector $selector)
 SimpleForm &getFormBySubmit (SimpleSelector $selector)
 array getFrameFocus ()
 array/string getFrames ()
 string getHeaders ()
 string getMethod ()
 string getMimeType ()
 string getRaw ()
 string getRealm ()
 string getRequest ()
 mixed getRequestData ()
 integer getResponseCode ()
 string getText ()
 string getTitle ()
 string getTransportError ()
 string getUrlById (string $id)
 array getUrls ()
 array getUrlsByLabel (string $label)
 boolean hasFrames ()
 boolean setField (SimpleSelector $selector, string $value)
 void setFrame (array $path,  &$page, SimplePage $page)
 boolean setFrameFocus (string $name)
 boolean setFrameFocusByIndex (integer $choice)
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 ( &$page, SimplePage $page)
addFrame (line 48)

Adds a parsed page to the frameset.

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

Clears the frame focus.

  • access: public
void clearFrameFocus ()
expandUrl (line 290)

Expands expandomatic URLs into fully qualified URLs for the frameset page.

  • return: Absolute URL.
  • access: public
SimpleUrl expandUrl (SimpleUrl $url)
getAuthentication (line 336)

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

  • return: Description of challenge type.
  • access: public
string getAuthentication ()
getBaseUrl (line 274)

Page base URL.

  • return: Current url.
  • access: public
SimpleUrl getBaseUrl ()
getField (line 586)

Accessor for a form element value within a page.

  • return: A string if the field is present, false if unchecked and null if missing.
  • access: public
string/boolean getField (SimpleSelector $selector)
  • SimpleSelector $selector: Field finder.
getFormById (line 506)

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.
getFormByImage (line 491)

Finds a held form by image using a selector.

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 &getFormByImage (SimpleSelector $selector)
  • SimpleSelector $selector: Image finder.
getFormBySubmit (line 476)

Finds a held form by button label. Will only search correctly built forms.

  • return: Form object containing the button.
  • access: public
SimpleForm &getFormBySubmit (SimpleSelector $selector)
  • SimpleSelector $selector: Button finder.
getFrameFocus (line 84)

Accessor for current frame focus. Will be false if no frame has focus. Will have the nested frame focus if any.

  • return: Labels or indexes of nested frames.
  • access: public
array getFrameFocus ()
getFrames (line 187)

Accessor for frames information.

  • return: Recursive hash of frame URL strings. The key is either a numerical index or the name attribute.
  • access: public
array/string getFrames ()
getHeaders (line 373)

Accessor for raw header information.

  • return: Header block.
  • access: public
string getHeaders ()
getMethod (line 247)

Request method used to fetch this frame.

  • return: GET, POST or HEAD.
  • access: public
string getMethod ()
getMimeType (line 311)

Accessor for current MIME type.

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

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

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

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

  • return: Name of security realm.
  • access: public
string getRealm ()
getRequest (line 361)

Accessor for outgoing header information.

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

Original request data.

  • return: Sent content.
  • access: public
mixed getRequestData ()
getResponseCode (line 323)

Accessor for last response code.

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

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

  • return: Plain text content.
  • access: public
string getText ()
getTitle (line 385)

Accessor for parsed title.

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

Accessor for last error.

  • return: Error from last response.
  • access: public
string getTransportError ()
getUrl (line 259)

Original resource name.

  • return: Current url.
  • access: public
SimpleUrl getUrl ()
getUrlById (line 438)

Accessor for a URL by the id attribute. If in a frameset then the first link found with that 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.
getUrls (line 394)

Accessor for a list of all fixed links.

  • return: List of urls as strings.
  • access: public
array getUrls ()
getUrlsByLabel (line 412)

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 176)

Test for the presence of a frameset.

  • return: Always true.
  • access: public
boolean hasFrames ()
setField (line 568)

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

  • return: True if value is valid.
  • access: public
boolean setField (SimpleSelector $selector, string $value)
  • SimpleSelector $selector: Field finder.
  • string $value: Value to set field to.
setFrame (line 63)

Replaces existing frame with another. If the frame is nested, then the call is passed down one level.

  • access: public
void setFrame (array $path,  &$page, SimplePage $page)
  • array $path: Path of frame in frameset.
  • SimplePage $page: Frame source.
  • &$page
setFrameFocus (line 139)

Sets the focus by name. If already focused and the target frame also has frames, then the nested frame will be focused.

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

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

If already focused and the target frame also has frames, then the nested frame will be focused.

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

Documentation generated on Sun, 04 May 2008 09:21:39 -0500 by phpDocumentor 1.3.0