Menu

Attempted to call method "getURIContent" on class "PHPCrawlerUtils"

Help
Anonymous
2015-03-17
2015-03-18
  • Anonymous

    Anonymous - 2015-03-17

    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...

     
  • Anonymous

    Anonymous - 2015-03-17

    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.

     
  • Uwe Hunfeld

    Uwe Hunfeld - 2015-03-18

    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?

     
  • Anonymous

    Anonymous - 2015-03-18

    To be perfectly honest, I have no idea why...

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.