Class Dapp

Description
  • version: 0.4

Located in /Dapp.php (line 21)


	
			
Variable Summary
 static mixed $DAPPER_HOST
 static mixed $DAPPER_SERVICE_PATH
 static mixed $DAPP_SERVICE_PATH
Method Summary
 Dapp Dapp (string $dappName, [string $applyToUrl = null], [array $variableArgs = array()], [array $loginCredentials = array()])
 DOMDocument getDOM ()
 string getHTML ()
 string getPageURL ()
 string getXML ()
 DOMXPath getXPath ([DOMDocument $doc = null])
Variables
static mixed $DAPPER_HOST = 'www.dapper.net' (line 26)

The host of the Dapper service

  • access: public
static mixed $DAPPER_SERVICE_PATH = '/RunDapp' (line 31)

The path of the Dapper service

  • access: public
static mixed $DAPP_SERVICE_PATH = '/websiteServices/dapp-json.php' (line 36)

The URL of the Dapp information service

  • access: public
Methods
Constructor Dapp (line 92)

Sets up the Dapp.

Constructor is used to set up the Dapp - it performs the HTTP request and receives the XML which comes back.

  • access: public
  • throws: NetworkErrorException
  • throws: DappNotFoundException
  • throws: InvalidDappOutputException
  • throws: MissingLoginCredentialsException
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.
getDOM (line 231)

Returns a DOMDocument object to work on the XML

  • return: DOMDocument object representing the Dapp's XML
  • access: public
  • throws: InvalidDappOutputException
  • link: http://www.php.net/dom
DOMDocument getDOM ()
getHTML (line 218)

Returns the HTML that the Dapp ran on as a string.

  • return: The HTML that the Dapp ran on
  • access: public
string getHTML ()
getPageURL (line 265)

Returns the URL of the page that was dapped

  • return: URL of the page that was dapped
  • access: public
string getPageURL ()
getXML (line 209)

Returns the XML output of the Dapp as a string.

  • return: The XML output of the Dapp
  • access: public
string getXML ()
getXPath (line 253)

Returns a DOMXPath object to work on the XML

  • return: DOMXPath object allowing XPath access to the Dapp's XML
  • access: public
  • throws: InvalidDappOutputException
  • link: http://www.php.net/dom
DOMXPath getXPath ([DOMDocument $doc = null])
  • DOMDocument $doc: DOMDocument object, as returned from getDOM() (optional)

Documentation generated on Mon, 31 Mar 2008 08:35:41 -0400 by phpDocumentor 1.3.0RC6