Moodle  2.2.1
http://www.collinsharper.com
SimpleFrameset Class Reference

Public Member Functions

 SimpleFrameset (&$page)
 addFrame (&$page, $name=false)
 setFrame ($path, &$page)
 getFrameFocus ()
 _getPublicNameFromIndex ($subject)
 setFrameFocusByIndex ($choice)
 setFrameFocus ($name)
 clearFrameFocus ()
 _clearNestedFramesFocus ()
 hasFrames ()
 getFrames ()
 getRaw ()
 getText ()
 getTransportError ()
 getMethod ()
 getUrl ()
 getBaseUrl ()
 expandUrl ($url)
 getRequestData ()
 getMimeType ()
 getResponseCode ()
 getAuthentication ()
 getRealm ()
 getRequest ()
 getHeaders ()
 getTitle ()
 getUrls ()
 getUrlsByLabel ($label)
 getUrlById ($id)
 _tagUrlsWithFrame ($urls, $frame)
getFormBySubmit ($selector)
getFormByImage ($selector)
getFormById ($id)
_findForm ($method, $attribute)
_findFormInFrame (&$page, $index, $method, $attribute)
 setField ($selector, $value)
 getField ($selector)

Data Fields

 $_frameset
 $_frames
 $_focus
 $_names

Detailed Description

Definition at line 24 of file frames.php.


Member Function Documentation

Clears the frame focus for any nested frames. private

Definition at line 165 of file frames.php.

Here is the caller graph for this function:

& _findForm ( method,
attribute 
)

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

Parameters:
string$methodMethod to use to find in a page.
string$attributeLabel, name or ID.
Returns:
SimpleForm Form object containing the matching ID. private

Definition at line 519 of file frames.php.

Here is the call graph for this function:

Here is the caller graph for this function:

& _findFormInFrame ( &$  page,
index,
method,
attribute 
)

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

Parameters:
SimplePage$pagePage content of frame.
integer$indexInternal frame representation.
string$methodMethod to use to find in a page.
string$attributeLabel, name or ID.
Returns:
SimpleForm Form object containing the matching ID. private

Definition at line 552 of file frames.php.

Here is the call graph for this function:

Here is the caller graph for this function:

_getPublicNameFromIndex ( subject)

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

Parameters:
integer$subjectInternal index.
Returns:
integer/string Public name. private

Definition at line 101 of file frames.php.

Here is the caller graph for this function:

_tagUrlsWithFrame ( urls,
frame 
)

Attaches the intended frame index to a list of URLs.

Parameters:
array$urlsList of SimpleUrls.
string$frameName of frame or index.
Returns:
array List of tagged URLs. private

Definition at line 457 of file frames.php.

Here is the call graph for this function:

Here is the caller graph for this function:

addFrame ( &$  page,
name = false 
)

Adds a parsed page to the frameset.

Parameters:
SimplePage$pageFrame page.
string$nameName of frame in frameset. public

Definition at line 48 of file frames.php.

Clears the frame focus. public

Definition at line 156 of file frames.php.

Here is the call graph for this function:

expandUrl ( url)

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

Parameters:
SimpleUrl$urlRelative URL.
Returns:
SimpleUrl Absolute URL. public

Definition at line 290 of file frames.php.

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

Returns:
string Description of challenge type. public

Definition at line 336 of file frames.php.

Page base URL.

Returns:
SimpleUrl Current url. public

Definition at line 274 of file frames.php.

getField ( selector)

Accessor for a form element value within a page.

Parameters:
SimpleSelector$selectorField finder.
Returns:
string/boolean A string if the field is present, false if unchecked and null if missing. public

Definition at line 586 of file frames.php.

& getFormById ( id)

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.

Parameters:
string$idForm label.
Returns:
SimpleForm Form object containing the matching ID. public

Definition at line 506 of file frames.php.

Here is the call graph for this function:

& getFormByImage ( selector)

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.

Parameters:
SimpleSelector$selectorImage finder.
Returns:
SimpleForm Form object containing the image. public

Definition at line 491 of file frames.php.

Here is the call graph for this function:

& getFormBySubmit ( selector)

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

Parameters:
SimpleSelector$selectorButton finder.
Returns:
SimpleForm Form object containing the button. public

Definition at line 476 of file frames.php.

Here is the call graph for this function:

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

Returns:
array Labels or indexes of nested frames. public

Definition at line 84 of file frames.php.

Here is the call graph for this function:

getFrames ( )

Accessor for frames information.

Returns:
array/string Recursive hash of frame URL strings. The key is either a numerical index or the name attribute. public

Definition at line 187 of file frames.php.

Here is the call graph for this function:

Accessor for raw header information.

Returns:
string Header block. public

Definition at line 373 of file frames.php.

getMethod ( )

Request method used to fetch this frame.

Returns:
string GET, POST or HEAD. public

Definition at line 247 of file frames.php.

Accessor for current MIME type.

Returns:
string MIME type as string; e.g. 'text/html' public

Definition at line 311 of file frames.php.

getRaw ( )

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

Returns:
string Raw unparsed content. public

Definition at line 202 of file frames.php.

getRealm ( )

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

Returns:
string Name of security realm. public

Definition at line 349 of file frames.php.

Accessor for outgoing header information.

Returns:
string Header block. public

Definition at line 361 of file frames.php.

Original request data.

Returns:
mixed Sent content. public

Definition at line 299 of file frames.php.

Accessor for last response code.

Returns:
integer Last HTTP response code received. public

Definition at line 323 of file frames.php.

getText ( )

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

Returns:
string Plain text content. public

Definition at line 219 of file frames.php.

getTitle ( )

Accessor for parsed title.

Returns:
string Title or false if no title is present. public

Definition at line 385 of file frames.php.

Accessor for last error.

Returns:
string Error from last response. public

Definition at line 235 of file frames.php.

getUrl ( )

Original resource name.

Returns:
SimpleUrl Current url. public

Definition at line 259 of file frames.php.

Here is the call graph for this function:

getUrlById ( id)

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.

Parameters:
string$idId attribute of link.
Returns:
string URL with that id. public

Definition at line 438 of file frames.php.

Here is the call graph for this function:

getUrls ( )

Accessor for a list of all fixed links.

Returns:
array List of urls as strings. public

Definition at line 394 of file frames.php.

getUrlsByLabel ( label)

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

Parameters:
string$labelText of link.
Returns:
array List of links with that label. public

Definition at line 412 of file frames.php.

Here is the call graph for this function:

hasFrames ( )

Test for the presence of a frameset.

Returns:
boolean Always true. public

Definition at line 176 of file frames.php.

Here is the caller graph for this function:

setField ( selector,
value 
)

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

Parameters:
SimpleSelector$selectorField finder.
string$valueValue to set field to.
Returns:
boolean True if value is valid. public

Definition at line 568 of file frames.php.

setFrame ( path,
&$  page 
)

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

Parameters:
array$pathPath of frame in frameset.
SimplePage$pageFrame source. public

Definition at line 63 of file frames.php.

setFrameFocus ( name)

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

Parameters:
string$nameChosen frame.
Returns:
boolean True if frame exists. public

Definition at line 139 of file frames.php.

Here is the call graph for this function:

setFrameFocusByIndex ( choice)

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.

Parameters:
integer$choiceChosen frame.
Returns:
boolean True if frame exists. public

Definition at line 118 of file frames.php.

Here is the call graph for this function:

SimpleFrameset ( &$  page)

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

Parameters:
SimplePage$pageFrameset page.

Definition at line 35 of file frames.php.


Field Documentation

$_focus

Definition at line 27 of file frames.php.

$_frames

Definition at line 26 of file frames.php.

$_frameset

Definition at line 25 of file frames.php.

$_names

Definition at line 28 of file frames.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations