Ok I think I solved my own question. What happens here is that the mmerian PHPCrawler package autoloads every class in the libs directory when installed in Symfony2. Now, there are 2 classes named PHPCrawlerUtils. The first is in its own folder, the second is missing the getURIcontent method. And after autoload is over, the second one prevails.
In the main class PHPCrawler, the constructor loads every correct classes he needs "if the class doesn't already exist". That's why the correct class isn't loaded, the incorrect one is already loaded. Finally, I included the PHPCrawlerUtils class once, without the condition statement about its existence.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "Help" comments posted by this user
Mark all as spam, and block user from posting to "Forum"
Hi,
on a related note with my previous question/problem mentioned here :
http://sourceforge.net/p/phpcrawl/discussion/307696/thread/35ee105e/
I have that error in Symfony2 while attempting to run the script (which I defined as a service, before calling it in the controller).
I can't understand why it can't find the method getURIContent...
View and moderate all "Help" comments posted by this user
Mark all as spam, and block user from posting to "Forum"
Ok I think I solved my own question. What happens here is that the mmerian PHPCrawler package autoloads every class in the libs directory when installed in Symfony2. Now, there are 2 classes named PHPCrawlerUtils. The first is in its own folder, the second is missing the getURIcontent method. And after autoload is over, the second one prevails.
In the main class PHPCrawler, the constructor loads every correct classes he needs "if the class doesn't already exist". That's why the correct class isn't loaded, the incorrect one is already loaded. Finally, I included the PHPCrawlerUtils class once, without the condition statement about its existence.
Hi!
Thanks a lot for posting your solution here!
Since i don't know much about Symfony i couldn't answer you to your problem.
One question: Why does the PHPCrawlerUtils-class exist two times in the framework?
What's the point here?
View and moderate all "Help" comments posted by this user
Mark all as spam, and block user from posting to "Forum"
To be perfectly honest, I have no idea why...