[Agavi-Users] Doctrine 1.2 needs 2 more lines to initialize properly

29 views
Skip to first unread message

Liutauras

unread,
Dec 17, 2009, 3:32:37 PM12/17/09
to us...@lists.agavi.org
Hi all,

I cant get Doctrine 1.2 to automaticaly load all generated models. Got errors like this:

Fatal error: Class 'BaseTagCach' not found in /var/www/www.site.web/app/lib/doctrine/TagCach.class.php on line 13
To make Doctrine1.2 load all generated models Doctrine needs to initialise 2 more static functions of Doctrine class in AgaviDoctrineDatabase.class.php :

        .....
92     // in any case, it's loaded now. maybe we need to register the autoloading stuff for it!
93     if(!in_array(array('Doctrine', 'autoload'), spl_autoload_functions())) {
94         // we do
96         spl_autoload_register(array('Doctrine', 'autoload'));
97     }
        .......

needs to write all this 3 lines:
....
spl_autoload_register(array('Doctrine', 'autoload'));
+++spl_autoload_register(array('Doctrine', 'modelsAutoload')); // without this /doctrine/generated Base.. models are not loaded
+++spl_autoload_register(array('Doctrine', 'extensionsAutoload'));
....

These functions static methods do exist, but after adding these lines exception occurs that says: Passed array does not specify an existing static method.

Anyone knows whats the problem and how to initialize these 2 methods to solve probl?
Thnx


David Zülke

unread,
Dec 22, 2009, 11:49:56 AM12/22/09
to Agavi Users Mailing List
Was it also you who filed http://trac.agavi.org/ticket/1197 ?

> _______________________________________________
> users mailing list
> us...@lists.agavi.org
> http://lists.agavi.org/mailman/listinfo/users

Reply all
Reply to author
Forward
0 new messages