PHRAME VERSION 3.1.0 Introduction of PhrameContainer & ErrorHandler classes together with major redesign of Phrame configuration options. Implementation of a solution to enable object references in the HttpRequest, HttpSession and ServerContext storage containers. Bug fixes and many improvements. action/Action * Where necessary added '&'-s to prevent objects from being copied. * setLocale(): refactored this method to use the Phrame container configuration to get the default locale. action/ActionForm * Where necessary added '&'-s to prevent objects from being copied. action/ActionServer * Re-factored coding to only support original Struts ActionServer methods. Moved all other methods to the new PhrameContainer class. * Removed references to components of the Log4Php package. * Where necessary added '&'-s to prevent objects from being copied. * Removed session restarting feature since this no longer is necessary due to the specific handling of the PHP session by the PhrameContainer * getConfigDigester(), initInternal(), initOther(): added these methods. * getModuleConfig(): refactored this method to use new getConfigDigester() method and to use the Phrame container to get the configuration URIs. Method now also sends an error response to the client if no module configuration was found. action/RequestProcessor * Removed references to components of the Log4Php package. * Where necessary added '&'-s to prevent objects from being copied. * Removed session restarting feature since this no longer is necessary due to the specific handling of the PHP session by the PhrameContainer * getRealPath(): moved this method to the ServerContext class. * initInternal(): stored the internal message resources in the server context rather than in a separate cache. * processMapping(): now sends an error response if no action was found (as specified by Struts). * processForwardConfig(): refactored this method to use the Phrame container and to create an absolute URL when redirecting to the forward path. actions/ViewAction * Where necessary added '&'-s to prevent objects from being copied. * Removed session restarting feature since this no longer is necessary due to the specific handling of the PHP session by the PhrameContainer context/HttpRequest * Re-factored all coding regarding the session associated with the request. * Where necessary added '&'-s to prevent objects from being copied. * Feature request [3.0.3_0002] New methods. Contributed by Oliver Jones. * constructor: improved handling of $_GET / $_POST to prevent problems with "magic quotes". Idea taken from SitePoint TechTimes #109 (www.sitepoint.com). Also assigned the global variables by reference rather than creating a copy. Now also initialises session to NULL; use getSession(TRUE) to create a new HttpSession for the request. * getCookies(): improved handling of $_COOKIES to prevent problems with "magic quotes" (see before). * getLocale(), getLocales(): default locale is now provided by the Phrame container. * getRequestedSessionId(): added this method. * getSession(): now always creates a new HttpSession if $create is TRUE, otherwise returns current session or NULL. context/HttpResponse * Refactored / new methods contributed by Oliver Jones. * addHeader(): separated multiple values for a header by a comma rather than a space * flushBuffer(): always forces a response status line. * storeCaches(): new method implementing the second part of solution to enable object references in the HttpRequest, HttpSession and ServerContext storage. context/HttpSession * Re-factored class to clean OO code. Also removed dependency with HttpSessionDatastructure class. * constructor: removed weird coding setting the object instance to NULL. Removed $create parameter. * Where necessary added '&'-s to prevent objects from being copied. context/Object * clone(): renamed this method to php4clone() for PHP5 compatibility. context/Cookie * New class contributed by Oliver Jones. context/PhrameContainer * Added this class incl. - bugfix [3.0.3_0001] Setting default PHRAME_CONTEXT value goes wrong - feature request [3.0.3_001] Add checking of incorrect paths - First part of solution to allow object references in the HttpRequest, HttpSession and ServerContext storage containers. - procesWelcomeFile() (originally from ActionServer): now exits with an error if no welcome file is found. context/RequestDispatcher * forward(): refactored this method to use the Phrame container configuration to get document root, context path & taglib URIs. Method now aborts processing if a taglib or the web resource to forward to fails to load. context/ServerContext * Re-factored class to clean OO code. Removed dependency with ServerContextDatastructure class. * Where necessary added '&'-s to prevent objects from being copied. * getRealPath(): added this method (moved from ActionServer). Refactored this method to get the context path from the container * getServerInfo(): added this method replacing the PHRAME_VERSION constant. util/ArrayConfigDigester * Refactored this class to production quality. util/ErrorHandler * Added this class. util/PhrameTagLib * Bugfix [3.0.2_001] Initialising $_FORM variable goes wrong if no form configuration found. * Added sysnonyms for new global variables $GLOBALS['_APPLICATION'], $GLOBALS['_HTTP_REQUREST'] and $GLOBALS['_HTTP_RESPONSE']. util/PropertyMessageResources * getMessage(): determined default locale through the container configuration rather than from a constant * loadLocale(): implemented suggestion from Matthew Havilah to prevent problems with comment liness in UTF-8 encoded files. Also changed this method to use the new $GLOBALS['_APPLICATION'] variable. Method now stores the internal Phrame messages in the server context rather than in a separate cache. PHRAME VERSION 3.0.3 Bugfixes and minor improvements. General * All constant values used by Phrame are now preceeded with '_' for consistency. * Feature request [3.0.1_0001] You may now add a query string to any forward path in a module configuration. Contributed by Matthew Havilah. * Added the principle of tag libraries more or less similar to JSP tag libraries. Tag libraries enable you to define functions that can be used in your web pages. Phrame comes with a library called 'PhrameTagLib.php' which is included in the /util subdirectory. To load the library, you have to define it in the options array of your ActionServer. See the documentation of ActionServer on how to do this. action/ActionServer * constructor: added handling of _TAGLIBS parameter. * getModuleConfig(), getRequestProcessor(): corrected possible problem with the determination of a class name if the full name starts with a slash * getServerContext(): removed this method; use "new ServerContext()" instead. action/RequestProcessor * initModuleMessageResources(): changed the key under wich module message resources are cached to _MESSAGES_KEY.'/'.the module prefix. * processActionCreate(), processActionForm(): corrected possible problem with the determination of a class name if the full name starts with a slash actions/ViewAction * Bugfix [3.0.2_0001] superfluous redefinition of constructor. context/HttpRequest * constructor: corrected possible security flaw with HttpRequest->parameters: depending on the request method this property is now only filled with the contents of $_GET or $_POST. See 'Security Corner' department in the December 2004 issue of PHP Architect. context/RequestDispatcher * Feature request [3.0.1_0001] Handling of optional query string in a RequestDispatcher's path. * forward(): removed all predefined variables like $_HTTP_REQUEST, $_ERRORS and _$TOKEN. If you want to continue to use these variables (plus a whole bunch of other variables), you have to define the Phrame tag library in the options array of your ActionServer. Also added just in time loading of tag libraries. utils/MessageResources * PropertyMessageResources->loadLocale(): changed the key under wich module message resources are cached to _MESSAGES_KEY.'/'.the module prefix. PHRAME VERSION 3.0.2 Bugfixes and minor improvements. General * Re-packaged Phrame's core classes to better reflect the Struts packages. * Changed source documentation to improve doc generation (e.g. by phpDocumentor). action/Action * getResources(): changed this method to return the MessageResources instance from the application context. * setLocale(): coded this method. action/ActionServer * Bugfix [3.0.1_0002] incorrect _INCLUDE_DIRS processing. * Bugfix [3.0.1_0004] incorrect calculation of session idle interval. * constructor: added _PHP_ERROR_REPORTING configuration parameter; removed _DEBUG and _DETAIL configuration parameters. Added correct setting of default value for session time out parameter, if applicable. Added caching of internal message resources. * getModuleConfig(): changed caching of configs to the application context. Also, the ModuleConfig instance itself is cached, rather than the internal map. Next to this caching, the current module is also separatly available in the application context (attribute with name _MODULE_KEY). action/RequestProcessor * Bugfix [3.0.1_0003] action->perform() compatibility. * Bugfix [3.0.1_0005] incorrect update of last access time of a session. * Moved initialization of MessagesResources to a dedicated method, initMessageResources(). actions/DispatchAction * execute(): changed call to method to be executed to use the $param variable. actions/ViewAction * prepare(): passed request parameter by reference rather than as a copy. * render(): implemented the request's RequestDispatcher to render the view. context/HttpSession * Bugfix [3.0.1_0005] incorrect update of last access time of a session. * updateLastAccessedTime(): removed this method since it is no longer used as a result of bugfix [3.0.1_0005]. context/RequestDispatcher * Bugfix [3.0.1_0001] incorrect value assignment to $_TOKEN variable. * forward() Implemented new ServerContext class. context/ServerContext * Added this class as a wrapper for the application context. util/MessageResources * getMessage(): changed the usage of loadLocale() to be more like Struts. * loadLocale(): changed caching of messages to the application context. Also, the MessageResources instance itself is cached, rather than the messages array. PHRAME VERSION 3.0.1 Initial Phrame 3 version.