Re: [PHP] Autoloading

2012-02-01 Thread Marco Behnke
Am 26.01.2012 15:44, schrieb Floyd Resler: > As stated, when I change __autoload to spl_autoload_register I get the can't be redeclared error. Any ideas? Try $callback = function($class_name) { $path = dirname(__FILE__)."/../../lib/class.{$class_name}.php"; if (file_exists($p

Re: [PHP] Autoloading

2012-01-26 Thread Floyd Resler
On Jan 26, 2012, at 10:15 AM, Stuart Dallas wrote: > On 26 Jan 2012, at 14:44, Floyd Resler wrote: > >> I am using __autoload for my site which is conflicting with the autoloading >> of PHPExcel. I tried using spl_autoload_register thinking that might be the >> way to go but when I tried I go

Re: [PHP] Autoloading

2012-01-26 Thread Stuart Dallas
On 26 Jan 2012, at 14:44, Floyd Resler wrote: > I am using __autoload for my site which is conflicting with the autoloading > of PHPExcel. I tried using spl_autoload_register thinking that might be the > way to go but when I tried I got a "cannot be redeclared" error. I include > my autoload

[PHP] Autoloading

2012-01-26 Thread Floyd Resler
I am using __autoload for my site which is conflicting with the autoloading of PHPExcel. I tried using spl_autoload_register thinking that might be the way to go but when I tried I got a "cannot be redeclared" error. I include my autoload script (include_once "../../lib/autoload.php";) and my

Re: [PHP] Autoloading with namespaces in 5.3.0

2009-06-01 Thread Eddie Drapkin
I did some further research and think I can manage to load \foo\bar\class.php fine, but if I use foo\bar\ as bar and load bar\class.php, does the autoloader have access to the scope of use or does it get translated to the FQ path? On Mon, Jun 1, 2009 at 10:44 AM, Nathan Nobbe wrote: > On Sat, May

Re: [PHP] Autoloading with namespaces in 5.3.0

2009-06-01 Thread Nathan Nobbe
On Sat, May 30, 2009 at 1:51 PM, Eddie Drapkin wrote: > Hey, I'm looking to start playing with 5.3.0, and thus by extension, > namespaces. One of the things that I definitely need support for is > autoloading, and the docs aren't exactly explicit in some (obvious to me) > cases. > > I have an au

[PHP] Autoloading with namespaces in 5.3.0

2009-05-30 Thread Eddie Drapkin
Hey, I'm looking to start playing with 5.3.0, and thus by extension, namespaces. One of the things that I definitely need support for is autoloading, and the docs aren't exactly explicit in some (obvious to me) cases. I have an autoloading class that internally handles file-not-found errors and t