function executeParser() {
//error_reporting(0);
if (version_compare(phpversion(), "5.0.0", ">="))
set_error_handler(array (
& $this,
"phpError"
), E_ALL);
else
set_error_handler(array (
& $this,
"phpError"
));
$this->db->connect();
// get the settings
if (empty ($this->config)) {
$this->getSettings();
}
// combine template and document variables $source= $this->mergeDocumentContent($source); // replace settings referenced in document $source= $this->mergeSettingsContent($source); // replace HTMLSnippets in document $source= $this->mergeChunkContent($source); // insert META tags & keywords $source= $this->mergeDocumentMETATags($source); // find and merge snippets $source= $this->evalSnippets($source); // find and replace Placeholders (must be parsed last) - Added by Raymond $source= $this->mergePlaceholderContent($source);
// Do automatic conversion of quoted URLs
$content
= preg_replace(
'/"('
. '\[\(site_url\)\]'
. '|\[\(base_url\)\]'
. '|' . preg_quote( $this->itsMODx->config['site_url'], '/' )
. '|' . preg_quote( $this->itsMODx->config['base_url'], '/' )
. '|'
. ')'
. '\[~(.*)~\]"/U'
. $this->itsEncodingModifier
, '"(yams_docr:\2)"'
, $content
, -1
);