I've been pottering around in the code and came across the following
changes that I feel need to be done, most are pedantic observations:
*version.php*
Change the version numbers. They are set at version 3.0.0
Also modify the branch version number
*Controller.class.php*
This is a singleton class BUT the implementation is poorly done:
There is no constructor, hence an additional controller object can be
created using the *new *keyword
There is no __clone method (should be private) to prevent the object
from being cloned
There are two ways of getting the controller instance
1. if none exist then newInstance() is to be used
2. if one does exist then getInstance() is to be used
Using the wrong one at the wrong time will result in a exception, this
coudl be tidied up
*WebRequest.class.php*
loadParameters() method
The code to parse the PATH_INFO should be conditional on AG_URL_FORMAT
(set up in settings.ini). You may want to extract all of the PATH_INFO
code to a private methods to make the code a little cleaner.
*SessionStorage.class.php*
initialize() method
This (I think) links into anther problem which I've yet to fully grasp
but I think that the session name needs to be more than just Agavi. I'd
suggest Agavi + ApplicationName (not certain where/if an app name is set)
The problem that I saw was when I ran two different M3 applications on
the same machine - not tested it with Agavi - but the second app would
fail if an object was saved with the user object of the first app, this
is because they are sharing the same session info and in the second app
the class is not auto loaded.
graeme.
_______________________________________________
agavi-dev mailing list
[email protected]
http://labworkz.com/cgi-bin/mailman/listinfo/agavi-dev