Hello, I am following the rtfm guide to build my own cmp.
Developing an Extra in MODX Revolution Part II
Everything has gone quite smooth until I try to load my base class.
if (!$this->modx->loadClass('reportsControllerRequest',$this->config['modelPath'].'reports/request/',true,true)) {
return 'Could not load controller request handler.';
}
I am unable to load the class. I have echoed out my modelPath setting and it is correct:
echo $this->config['modelPath']; // produces /Applications/MAMP/htdocs/site/trunk/core/components/reports/model/
So it looks like the entire path should be this:
echo $this->config['modelPath'].'reports/request/'; // produces Applications/MAMP/htdocs/site/trunk/core/components/reports/model/reports/request/
...which is correct.
Initially I had the physical file name in mixed case. But I read a post that suggested making it lower case which I have done: "reportscontrollerrequest.php"
From the modx error logs I get:
"Could not load class: reportsControlleRrequest from reportscontrollerrequest."
It just looks like everything is in the right spot. Clearly I am doing something wrong, any suggestions?
Thank you for your time!