domDocument != DOMDocument, right?
Jul 22, 2015
5
Level 1
Using Dom Document
I want to do some XML processing in my page logger middle ware. Basically turning an array in to XML.
When I run this code:
if (!$this->domDoc = new domDocument($this->domVersion, $this->domEncoding ))
throw new Exception(XML_DOMDOC_ERROR);
I am getting this in my error log:
HP Fatal error: Class 'App\domDocument' not found in /Applications/MAMP/htdocs/lara_AMRISV5/trunk/app/XML.php on line 40
I am probably being really stupid but the class exists when I test for it:
class_exists('DOMDocument');
Do I need to do something special to make it work? Am I being a fudge wit?
Level 53
Did you import the full namespace at the top using the use keyword like:
use Path\To\DOMDocument;
Please or to participate in this conversation.