Where to set $GLOBALS['egw_info']['flags']['autoload']?

eGW provides the ability for apps to provide their own autoload
functions (common_functions.inc.php, 1413), by specifying the function
in $GLOBALS[‘egw_info’][‘flags’][‘autoload’]. Where can I set this
flag so that it is available before the session (appsession) is
unserialized?
Or can we change it so it’s a hook?

Nathan Gray
nathan at goarctic dot com


The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there’s a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you’ll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com


eGroupWare-developers mailing list
eGroupWare-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-developers

You do that just before the actual SessionRestore Routine within your class
-> see r26988
It happend just there.
Best regards
Klausi

egroupware-developers@lists.sourceforge.net

eGW provides the ability for apps to provide their own autoload
functions (common_functions.inc.php, 1413), by specifying the function
in $GLOBALS[‘egw_info’][‘flags’][‘autoload’]. Where can I set this
flag so that it is available before the session (appsession) is
unserialized?
Or can we change it so it’s a hook?

Nathan Gray
nathan at goarctic dot com



The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there’s a perfect scanner to get the job done! With the NEW KODAK
i700
Series Scanner you’ll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com


eGroupWare-developers mailing list
eGroupWare-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-developers

–
Stylite GmbH
[ open style of IT ]
Morschheimer Strasse 15
67292 Kirchheimbolanden

fon 06352 . 70629-0
fax 06352 . 70629-30
www.stylite.de

Handelsregister Kaiserslautern HRB 30575
Geschäftsführer: Andre Keller, Gudrun Müller, Nigel Vickers, Ralf Becker


The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there’s a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you’ll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com


eGroupWare-developers mailing list
eGroupWare-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-developers

You do that just before the actual SessionRestore Routine within
your class
-> see r26988
It happend just there.

How is that function called?
I can’t find anywhere outside of emailadmin that goes through and
calls that function, it seems to only be called from inside the class.

Do I have the order wrong?
I thought if I stick an object into the session, I need to have the
object’s class definition loaded before the object gets unserialized.
Is the correct way to do this (automatically, I know I can explicitly
require the file) to set the flag, then unserialize the object?

Nathan Gray
nathan at goarctic dot com


The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there’s a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you’ll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com


eGroupWare-developers mailing list
eGroupWare-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-developers

the function is called autoload, as defined in that very class.
Its needed only there to ensure, that the emailadmin objects, that are not
autoload conform are
loaded with the function before the unserialize takes place. Its supposed to
be local to that
application only, while its objects are stored and restored. If you store
objects of diiferent
applications with your class, your function should include the classes in
question as well.
It is done in emailadmin::emailadmin_bo
felamimail::bopreferences
and
felamimail::bofelamimail
Klausi

egroupware-developers@lists.sourceforge.net

You do that just before the actual SessionRestore Routine within
your class
-> see r26988
It happend just there.

How is that function called?
I can’t find anywhere outside of emailadmin that goes through and
calls that function, it seems to only be called from inside the class.

Do I have the order wrong?
I thought if I stick an object into the session, I need to have the
object’s class definition loaded before the object gets unserialized.
Is the correct way to do this (automatically, I know I can explicitly
require the file) to set the flag, then unserialize the object?

Nathan Gray
nathan at goarctic dot com



The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there’s a perfect scanner to get the job done! With the NEW KODAK
i700
Series Scanner you’ll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com


eGroupWare-developers mailing list
eGroupWare-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-developers

–
Stylite GmbH
[ open style of IT ]
Morschheimer Strasse 15
67292 Kirchheimbolanden

fon 06352 . 70629-0
fax 06352 . 70629-30
www.stylite.de

Handelsregister Kaiserslautern HRB 30575
Geschäftsführer: Andre Keller, Gudrun Müller, Nigel Vickers, Ralf Becker


The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there’s a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you’ll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com


eGroupWare-developers mailing list
eGroupWare-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-developers

I appreciate your time, but I’m definitely having some major problems.

I’m working with a SalesOrder. In the ui_perp_sales_order.edit
function, I store it in the appsession:
$GLOBALS[‘egw’]->session->appsession(‘order’, false, $sales_order);

I have an ajax callback that performs some operations on it
(ajax_perp_sales_order->change_client):
$order = $GLOBALS[‘egw’]->session->appsession(‘order’);

Both files, in the same app, explicitly require
class.SalesOrder.inc.php, but $order is now
__PHP_Incomplete_Class Object

$GLOBALS[‘egw_info’][‘flags’][‘currentapp’] is ‘perp_orders’ every
time I call appsession().

My autoload doesn’t get called for SalesOrder, even if I set the flag
at the top of both files.
eGW’s __autoload() does, which fails because at the time it tries, the
flag is not set.

Putting common_functions.inc.php line 1407 back in fixes it, but I
understand the desire to move away from that.

Nathan Gray
nathan at goarctic dot com


The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there’s a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you’ll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com


eGroupWare-developers mailing list
eGroupWare-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-developers

Hi Nathan,

there’s a simple trick, how you can store object in the session, without
the need to have autoloading available at session start time: serialize
the object, before storing it in the session. Then you have complete
control, before the object get’s unserialized.

I attached a little test, which demonstrates all the different
behaviors. It’s good to learn how the session stuff really works
(without all the fluff EGroupware addes).

Ralf

Nathan Gray schrieb:

I appreciate your time, but I’m definitely having some major problems.

I’m working with a SalesOrder. In the ui_perp_sales_order.edit
function, I store it in the appsession:
$GLOBALS[‘egw’]->session->appsession(‘order’, false, $sales_order);

I have an ajax callback that performs some operations on it
(ajax_perp_sales_order->change_client):
$order = $GLOBALS[‘egw’]->session->appsession(‘order’);

Both files, in the same app, explicitly require
class.SalesOrder.inc.php, but $order is now
__PHP_Incomplete_Class Object

$GLOBALS[‘egw_info’][‘flags’][‘currentapp’] is ‘perp_orders’ every
time I call appsession().

My autoload doesn’t get called for SalesOrder, even if I set the flag
at the top of both files.
eGW’s __autoload() does, which fails because at the time it tries, the
flag is not set.

Putting common_functions.inc.php line 1407 back in fixes it, but I
understand the desire to move away from that.

Nathan Gray
nathan at goarctic dot com


The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there’s a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you’ll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com


eGroupWare-developers mailing list
eGroupWare-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-developers

–
Ralf Becker
Director Software Development

Stylite GmbH
[open style of IT]

Morschheimer Strasse 15
67292 Kirchheimbolanden

fon +49 (0) 6352 70629-0
fax +49 (0) 6352 70629-30
mailto: rb@stylite.de

www.stylite.de
www.egroupware.org


Geschäftsführer Andre Keller, Gudrun Müller,
Nigel Vickers und Ralf Becker
Registergericht Kaiserslautern HRB 30575
Umsatzsteuer-Id / VAT-Id: DE214280951