$doc = new \DOMDocument();

By default, if you try to create an instance of a class which is not fully
qualified (in your case just "DOMDocument") PHP will look for the class on
the current namespace (Acme\DemoBundle\Controller in your case).

More info: http://www.php.net/manual/en/language.namespaces.basics.php

2011/4/17 Josher <joshuatayl...@gmail.com>

> Hey All,
> Having fun using symfony2!
>
> In my controller, I'm doing the following:
> $doc = new DOMDocument();
>
> However, symfony2 comes up with:
> Fatal error: Class 'Acme\DemoBundle\Controller\DOMDocument' not found
> in
>
> As you can see, it thinks that DOMDocument is apart of symfony2, and
> it is really a part of PHP.
>
> How do I call these type of functions correctly?
>
> Thanks,
> Josh
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to