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)


	
			
Method Summary
 SimpleFrameset __construct (SimplePage $page)
 void addFrame (SimplePage $page, [string $name = false])
 void clearFrameFocus ()
 SimpleForm findForm (string $method, string $attribute)
 SimpleForm findFormInFrame (SimplePage $page, integer $index, string $method, string $attribute)
 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 ()
 integer/string getPublicNameFromIndex (integer $subject)
 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, SimplePage $page)
 boolean setFrameFocus (string $name)
 boolean setFrameFocusByIndex (integer $choice)
 array tagUrlsWithFrame (array $urls, string $frame)
Methods
Constructor __construct (line 35)

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

SimpleFrameset __construct (SimplePage $page)
addFrame (line 48)

Adds a parsed page to the frameset.

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

Clears the frame focus.

  • access: public
void clearFrameFocus ()
clearNestedFramesFocus (line 165)

Clears the frame focus for any nested frames.

  • access: protected
void clearNestedFramesFocus ()
expandUrl (line 290)

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

  • return: Absolute URL.
  • access: public
SimpleUrl expandUrl (SimpleUrl $url)
findForm (line 516)

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

  • return: Form object containing the matching ID.
  • access: protected
SimpleForm findForm (string $method, string $attribute)
  • string $method: Method to use to find in a page.
  • string $attribute: Label, name or ID.
findFormInFrame (line 548)

Finds a form in a page using a form finding method. Will also tag the form with the frame name it belongs in.

  • return: Form object containing the matching ID.
  • access: protected
SimpleForm findFormInFrame (SimplePage $page, integer $index, string $method, string $attribute)
  • SimplePage $page: Page content of frame.
  • integer $index: Internal frame representation.
  • string $method: Method to use to find in a page.
  • string $attribute: Label, name or ID.
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 582)

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

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

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 ()
getPublicNameFromIndex (line 101)

Turns an internal array index into the frames list into a public name, or if none, then a one offset index.

  • return: Public name.
  • access: protected
integer/string getPublicNameFromIndex (integer $subject)
  • integer $subject: Internal index.
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 564)

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, SimplePage $page)
  • array $path: Path of frame in frameset.
  • SimplePage $page: Frame source.
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.
tagUrlsWithFrame (line 457)

Attaches the intended frame index to a list of URLs.

  • return: List of tagged URLs.
  • access: protected
array tagUrlsWithFrame (array $urls, string $frame)
  • array $urls: List of SimpleUrls.
  • string $frame: Name of frame or index.

Documentation generated on Sun, 31 Oct 2010 16:31:34 -0500 by phpDocumentor 1.4.3