Oleg Bronzov Tue Nov 30 04:51:06 -0500 2010

Subject: Autoload models function

Hi. For first thanks for this realy great soft.

I want to use it in my framework and i have one problem with your autoload function. My framework have autoload function and when i include ActiveRecord.php it replaced my autoload function.

I think it will be better if you write some mechanism which will be disable this function.
For example constant: defined('__AUTOLOAD_DISABLED __') || spl_autoload_register('activerecord_autoload');
Or if user do not setup models directory that this function not setup too.

Thanks and sorry for my english.


Jon Moberley Wed Dec 01 10:37:43 -0500 2010

I ran into the same issue and commented out the PHP.AR autoloader code in order to work around it.

Having two alternate files to include, one with autoloader, one without would be another solution.

kirk bushell Tue Dec 07 17:43:36 -0500 2010

You're meant to configure your autoloader. There is also information in the frameworks section of the wiki about this.

You simply configure whatever autoloader you want, and disable phpactiverecord's one, if necessary (as Jon mentioned).

Kien La Sun Dec 12 18:49:03 -0500 2010

Added an option to disable the autoloader. See https://github.com/kla/php-activerecord/commit/7a1c7d37422fb84543390548a1250f48cbc3347c

Jon Moberley Sun Dec 12 19:22:50 -0500 2010

Thanks Kien.

Oleg Bronzov Mon Dec 13 03:08:00 -0500 2010

Thanks Kien so much. Now I can use AR in my framework without patching.

(1-5/5)