Hi, I am quite new to MODx but quite experienced about PHP.
I am working on my new Snippets, but have no access to the TemplateVars from within my PHP Code. It works perfectly in HTML using [[*xxx]].
My snippet looks like this:
echo "\n".'$modx: '; print_r($modx);
echo "\n".'documentObject: '; print_r($xxx=$modx->documentObject);
echo "\n".'getTemplateVars('*'): '; print_r($modx->getTemplateVars('*'));
documentObject is empty
getTemplateVars(’*’) ==> Fatal error: Call to undefined method modX::getTemplateVars()
Am I doing anything wrong? On this page
http://rtfm.modx.com/display/MODx096/Document+Variables I read that it should work like this?
I am using: MODX Revolution 2.1.3-pl (traditional) on localhost
OS: Linux (ubuntu) Apache PHP 5.3.5 mysql, pdo_mysql installed
Browser: Firefox
I have caching disabled by: cache_scripts=no cache_resources=no
How can I access those TVs from inside php?
If I do print_r($modx) this Object does not contain any Field named "documentObject"

.
I searched the whole code of MODx for the word "documentObject" but could not find it.
Before I sent this entry I thought that I read on. I found that something more did not work:
echo "\n".’documentIdentifier: ’.$modx->documentIdentifier;
Also Empty

.
What Am I doing wrong? I had planned to go on Vacation yesterday but can’t leve because this Project is not finished. Please HELP!
NOTE: the only special Thing on my configuration is, that my MODx Files are not placed in document root. They are in some subfolder and look like Doc Root by useng mod_rewirte:
RewriteCond %{HTTP_HOST} ^www.xxx.at$
RewriteCond %{REQUEST_URI} !^/xxx/
RewriteRule ^(.*)$ /xxx/www/$1 [L]
I tried to configure the Server that it will not have to use this trick, but that did not change anything.
Hannes
For better analysis I wanted to post my $modx Variable (but I am limited to 3000 Character).