DocumentParser Object

The DocumentParser class is the core of the Evo page rendering framework. The DocumentParser object can be accessed with the global $modx from Snippets, Modules, and Plugins.

To see what the $modx variable contains when your script is run, try putting this in to your script:

<?php
die(print_r($modx,true));
?>
WARNING!
That command will output a large amount of data to your browser, it also should not be executed on live sites as doing so reveals your database password. Use at your own risk! Also keep in mind that the $modx contains your database username and password and executing the line above will expose those credentials.

 

Documentation for the following to be written shortly:

Members

  • [templateObject]
  • [snippetObjects]
  • [stopOnNotice]
  • [executedQueries]
  • [queryTime]
  • [currentSnippet]
  • [documentName]
  • [aliases]
  • [visitor]
  • [entrypage]
  • [dumpSnippets]
  • [chunkCache]
  • [snippetCache]
  • [contentTypes]
  • [dumpSQL]
  • [queryCode]
  • [virtualDir]
  • [placeholders]
  • [sjscripts]
  • [loadedjscripts]
  • [jscripts]
  • [documentMap]

Methods

Resources

  • [getActiveChildren]
  • [getDocument]
  • [getDocuments]
  • [getDocumentIdentifier]
  • [getPageInfo]

Users

  • [changePassword]
  • [getDocGroups]
  • [getUserDocGroups]
  • [getUserInfo]
  • [getWebUserInfo]
  • [isMemberOfWebGroup]
  • [userLoggedIn]

Elements

  • [getChunk]
  • [parseChunk]
  • [getSnippetId]
  • [getSnippetName]
  • [getTemplateVar]
  • [getTemplateVars]
  • [getTemplateVarOutput]
  • [getFullTableName]
  • [getPlaceholder]
  • [setPlaceholder]

Utilities

  • [sendAlert]
  • [regClientStartupScript]
  • [regClientScript]
  • [regClientStartupHTMLBlock]
  • [regClientHTMLBlock]
  • [stripTags]
  • [makeUrl]
  • [getKeywords]
  • [getMETATags]
  • [invokeEvent]
  • [getMicroTime]
  • [getRegisteredClientScripts]
  • [getRegisteredClientStartupScripts]
  • [sendErrorPage]
  • [sendForward]
  • [sendRedirect]
  • [sendUnauthorizedPage]

Other internal functions - use with extreme caution

  • [removeEventListener]
  • [removeAllEventListener]
  • [parseProperties]
  • [getConfig]
  • [getVersionData]
  • [makeList]
  • [clearCache]
  • [checkCache]
  • [checkPreview]
  • [checkPublishStatus]
  • [checkSession]
  • [checkSiteStatus]
  • [cleanDocumentIdentifier]
  • [insideManager] - deprecated
  • [putChunk] - deprecated
  • [dbClose] - deprecated, use DBAPI
  • [dbConnect] - deprecated, use DBAPI
  • [dbQuery] - deprecated, use DBAPI
  • [affectedRows] - deprecated, use DBAPI
  • [fetchRow] - deprecated, use DBAPI
  • [recordCount] - deprecated, use DBAPI
  • [evalPlugin]
  • [evalSnippet]
  • [evalSnippets]
  • [executeParser]
  • [getDocumentMethod]
  • [getDocumentObject]
  • [getSettings]
  • [insertId]
  • [loadExtension]
  • [makeFriendlyURL]
  • [mergeChunkContent]
  • [mergeDocumentContent]
  • [mergeDocumentMETATags]
  • [mergePlaceholderContent]
  • [mergeSettingsContent]
  • [messageQuit]
  • [outputContent]
  • [parseDocumentSource]
  • [phpError]
  • [postProcess]
  • [prepareResponse]
  • [rewriteUrls]

 

Suggest an edit to this page.