0

I am using in a project phpQuery for parsing HTML and Doctrine2 for DB persistence.

Doctrine 2 uses an autoloader strategy based on namespaces, so f.e. when calling a \Doctrine\Orm\EntityManager it goes inside DoctrineDir__/Doctrine/Orm/EntityManager.php loading relative class.

The problem is that phpQuery is a complex library that I need to scrape some HTML necessary for my project, and it's not namespaced.

I have tried namespacing it, but the phpquery doesn't work, giving me no error.

So what I am asking is there any code that can makes me exclude some classes from the autoloading strategy in anyway?

THanks

giuseppe
  • 827
  • 1
  • 9
  • 19
  • I'm not sure to understand. Why are you speaking of Doctrine 2 here ? Which kind of autoloader are you using ? How do you load phpQuery at the moment ? – Blackhole May 09 '13 at 13:10
  • I don't understand your comment. I am using phpquery to get some html, and Doctrine to persist the result, anyway I have found probably luckily a solution, thanks – giuseppe May 13 '13 at 14:01

1 Answers1

0

Also if that seemed very strange, I have solved the problem simply including the file as normal after the declaration of Entity Manager and all scripts.

Latest time didn't work, but this time yes. Strange!

Edit: it works probably only on procedural style php code, probably inside some objects it may give any problem.

giuseppe
  • 827
  • 1
  • 9
  • 19