Difference between revisions of "The PHP Transform Environment"
From Organic Design wiki
m |
({{legacy}}, not in help) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | + | {{legacy}} | |
The runtime environment available to PHP transforms is as follows: | The runtime environment available to PHP transforms is as follows: | ||
;Local Variables: | ;Local Variables: | ||
Line 34: | Line 34: | ||
*'''$wgTitle''' | *'''$wgTitle''' | ||
*'''$wgParser''' | *'''$wgParser''' | ||
+ | [[Category:XmlWiki]] |
Latest revision as of 03:08, 21 August 2008
The runtime environment available to PHP transforms is as follows:
- Local Variables
- $article the text content of the current article
- $title the title of the current article
- $properties the properties DOM object of the current article
- $tCode the PHP code of the currently executing transform
- $tTitle the article title of the currently executing transform
- $tProperties the properties DOM object for the currently executing transform
- $event the event that called this transform (eg. data, view, edit, save)
- $path the path into the properties object of this transform's data elements
- $script the currently executing script (index.php)
- Globals
- $xwUserName the name of the currently logged in user
- $xwUserSYS the DOM object of the users Sys:User XML article
- $xwUserGroups the groups this user belongs to
- $xwEdit true if editing the current article
- $xwView true if viewing the current article
- $xwRaw true if the article should be returned without the surrounding site template
- $xwPreview true if previewing the article
- $xwSave true if saving the article
- $xwArticleTitle the title of the current article
- $xwArticle the text of the current article
- $xwArticleProperties the DOM object of the current article's properties
- $xwIsProperties true if current article is an XML properties article
- $xwIsSystem true if current article is an XML Sys:User article
- $xwIsUser true if user is logged in and not an anonymous IP address
- $xwIsAdmin true if user is an XmlWiki administrator
- MediaWiki
- $wgArticle
- $wgUser
- $wgTitle
- $wgParser