Sets up the Dapp.
Constructor is used to set up the Dapp - it performs the HTTP request and receives the XML which comes back.
Dapp
Dapp
(string $dappName, [string $applyToUrl = null], [array $variableArgs = array()], [array $loginCredentials = array()])
-
string
$dappName: The identifier of the Dapp.
-
string
$applyToUrl: The URL of the page you wish to Dapp (optional). Only makes sense when $variableArgs is not supplied.
-
array
$variableArgs: The variable input arguments to pass to the Dapp (optional). This should be a hash. If the variables are named (in the event of POST Dapp), then the hash keys should be the names, otherwise they should be numeric indices.
-
array
$loginCredentials: The username and password for the remote website (optional). This should be a hash with keys "username" and "password". If the credentials are supplied, then there should be an additional key called "encryptionAlg" with value "1". If you do not supply this information and the Dapp requires it, the constructor will throw MissingLoginCredentialsException.
Returns a DOMDocument object to work on the XML
DOMDocument
getDOM
()
Returns the HTML that the Dapp ran on as a string.
string
getHTML
()
Returns the URL of the page that was dapped
string
getPageURL
()
Returns the XML output of the Dapp as a string.
string
getXML
()
Returns a DOMXPath object to work on the XML
DOMXPath
getXPath
([DOMDocument $doc = null])
-
DOMDocument
$doc: DOMDocument object, as returned from getDOM() (optional)