Loading Please wait...

Request Object Model.

Collaboration diagram for Request Object Model.:


Modules

 Cookie Management.
 This file is part of Zigmoyd PHP Framework.
 Session Management.
 This file is part of Zigmoyd PHP Framework.
 File Upload
 This file is part of Zigmoyd PHP Framework.
 validation.
 This file is part of Zigmoyd PHP Framework.

Data Structures

class  zRom_fields
 Container of a Field. More...
class  zRom_form
 Works as a container of GET/POST. More...
class  zRom_upload
 Works as a container of File Upload. More...
class  zRom
 Container of all Request Components. More...

Detailed Description

Zigmoyd Handles all request Components through ROM(Request Object Model) layer It handles GET/POST/COOKIE/SESSION/File Upload/Client Request Information/Server Information etc.. You use this module from your controller through $this->request Object which is of type zRom Class. That class again have attributes like get/post/cookie/session etc.. which you can use like. $this->request->get, $this->request->post, $this->request->cookie, $this->request->session etc.. which you can see in documentation of zRom Class.

You can do validation on get/post/file upload request. through initValidator() method which thakes a validation map name. e.g. You store all validation Criteria(s) on a validation Map(file) which will be parsed to provide the filter.to read more about validation map read validation.

ROM is made is such a way that will be easy to track user Request parameters like Browser OS etc.. even from CSS or JS files.

ROM defines different Macros to track User Browser.

		CLIENT_BROWSER   Holds a String Data representing Browser Name
		IS_OPERA         If Client's browser is Opera the string "opera" is stored in it and all others are set to false.
		IS_WEBTV         Same as above
		IS_IE            Same as above
		IS_NETPOSITIVE   Same as above
		IS_MSIE          Same as above
		IS_MSPIE         Same as above
		IS_GALEON        Same as above
		IS_KONQUEROR     Same as above
		IS_ICAB          Same as above
		IS_OMNIWEB       Same as above
		IS_PHOENIX       Same as above
		IS_FIREBIRD      Same as above
		IS_FIREFOX       Same as above
		IS_MOZILLA       Same as above
		IS_AMAYA         Same as above
		IS_LYNX          Same as above
		IS_SAFARI        Same as above
		IS_NETSCAPE      Same as above
	
ROM defines different macros to detect the User's OS.
		CLIENT_OS     Holds a String Data representing Browser Name
		IS_WIN        If Client's OS is Win the string "win" is stored in it and all others are set to false.
		IS_WINDOWS    same as above
		IS_MAC        same as above
		IS_MACINTOSH  same as above
		IS_LINUX      same as above
		IS_OS2        same as above
		IS_BEOS       same as above
	
You can simply print CLIENT_BROWSER or CLIENT_OS To print User's Browser and OS.
you can also run a switch case or any conditational block to do according to Client's Browser.
  switch(CLIENT_BROWSER){
    case IS_OPERA:
        //Do Opera Specific Things
      break;
    case IS_IE:
        //Do IE specific Things
      break;
    default:
        //Do the default Logic Here.
  }
Note:
you can embed PHP codes in CSS or js in zigmoyd.

Generated on Mon Oct 27 23:52:42 2008 for zigmoyd.kdevelop by doxygen 1.5.6