void AppDoc(
mixed
&$mxdStarter, [integer
$intUse = XAO_DOC_NEW]
)
|
|
AppDoc constructor
This method runs the parent constructor and sets up the xao namespace. There is no way to detect if a namespace declaration exists (to prevent duplicates). At the moment, one is inserted regardless!!! This is absolutely neccesary due to their usage by exceptions. WARNING:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: THIS MEANS THAT YOU CANNOT IMPORT EXISTING XML FILES WHICH HAVE A THE NAMESPACE xmlns:xao ALREADY DECLARED IN THE ROOT ELEMENT. The current DOMXML extension allows multiple attributes of the same name to be inserted (not good). It's namespace functions don't allow a [non-default] namespace declaration to be inserted without changing the prefix of the tag in context - so we're forced to use the dubious "set_attribute()" method instead.
Parameters:
mixed |
&$mxdStarter: |
starting data |
integer |
$intUse: |
how to use the staring data |
API Tags:
bool &ndSetStylePI(
uri
$uriStyleSheet, [boolean
$blnCheck = true]
)
|
|
Insert stylesheet processing instruction
This processing instruction is used by the transform() method if a stylesheet URI is not specifically provided to it. This method will automatically be called in the constructor if the user overrides the $this->_uriStyleSheet member attribute. It may, however, be called at any time by the user. Only one xsl stylsheet PI is maintained in the document. If it was already set at the time of the call to this method, then the new stylsheet URI will _replace_ the one in the existing PI.
Parameters:
uri |
$uriStyleSheet: |
path to XSL stylesheet |
boolean |
$blnCheck: |
Whether or not to check(parse) the file. |
API Tags:
Return: | success |
Access: | public |
void Send(
[string
$strAlt = ""]
)
|
|
Send the serialised XML content of this object to the client
This function will emit the contents of this XML document as a string to the user-agent. It checks to see if the option was set to bind the error data [built up from usage of $this->Throw()] to the content. It also signals the user agent to expect text in XML format. When XAO is used as a framework, then some sort of send
Parameters:
string |
$strAlt: |
alternate payload which will be sent |
API Tags:
void SetInternalErrorStyle(
uri
$uri
)
|
|
Set the name of the internal error stylsheet using in debug mode
This shouldn't need to be changed. However, if it is not appropriate for your circumstances, you may change it. Bear in mind that the uri must be specified as a relative path to the physical location of the xao DomDoc.php file.
Parameters:
uri |
$uri: |
Relative path to internal error stylesheet |
API Tags:
Return data that would be destined for the client (in current state)
This function is specific to AppDoc and not DomDoc because of the strAltPayload member attribute. This function can be used by the RpcController class if the user bases their request class on AppDoc. For instnace, they may want to take advantage of AppDoc's transform capabilities to convernt proprietary content into another format such as RSS.
API Tags:
void Throw(
string
$strErrMsg, [array
$arrAttribs = null], [mixed
$blnDie = false]
)
|
|
Wrapper for parent::throw() function adding ability to abort script
This function basically calls the parent function of the same name but also allows the caller to optionally abort the script if the last argument is set to true.
Parameters:
string |
$strErrMsg: |
Main error message |
array |
$arrAttribs: |
A hash of name/vals which will be attributes in the exception tag |
API Tags:
Redefinition of:
- DomDoc::Throw()
- Base error logger
void Transform(
[mixed
$arrCacheParams = null]
)
|
|
Prepares $this->strAltPayload with XSLT transformation result data
This function is usually called just prior to $this->Send() It is used when XSLT tranformations are required. It short-circuits the behaviour of $this->Send by populating $this->strAltPayload the results of the transformation. Note that this method requires a cirtain amount of preparation work by the user - ie. a stylsheet must be set using $this->ndSetStylePi()
API Tags:
uri uriGetInternalErrorStyle(
)
|
|
Get the absolute system location of the internal error stylsheet.
This method is needed to enforce a location that is relative to XAO_AppDoc.php and not the last file in the call stack. See notes on $this->SetInternalErrorStyle();
API Tags:
Return: | Absolute path to internal error stylsheet. |
Access: | public |