Difference between revisions of "Global object extensions"
From Fernseher
Jump to navigationJump to search
(New page: A couple functions, I didn't know where to put, but definitely wanted for my Modjs implementation, so they went onto the global object. If I can think of a better place for them, they...) |
|||
(One intermediate revision by the same user not shown) | |||
Line 7: | Line 7: | ||
These could throw exceptions if the object or string cannot be converted or is otherwise malformed: | These could throw exceptions if the object or string cannot be converted or is otherwise malformed: | ||
JsonCodingException | JsonCodingException | ||
The global objects I've added are these: | |||
*[[server API|server]]: Controls the environment, logging, and general low-level write back to the server, etc. | |||
*[[HTTPRequest|request]]: The incoming HTTP Request from apache through [[Modjs]]. This is the prime [[HTTPRequest]]. | |||
*[[HTTPResponse|response]]: The outgoing HTTP Response from this script back to the client through apache and [[Modjs]]. This is the prime [[HTTPResponse]]. | |||
Constructors on the global object now: | |||
*[[File API|File]] | |||
*[[HTTPRequest]] | |||
*[[HTTPResponse]] | |||
*[[MailMesage]] | |||
*[[MimeEntity]] | |||
*[[MimeHeader]] | |||
*[[MimeHeader|MimeValue]] | |||
*[[MimeHeader|MimeProperty]] | |||
*[[ProcessConnection]] | |||
*[[TCPConnection]] | |||
*[[DbConnection]] | |||
*[[DbConnection|DbStatement]] |
Latest revision as of 22:27, 22 January 2009
A couple functions, I didn't know where to put, but definitely wanted for my Modjs implementation, so they went onto the global object. If I can think of a better place for them, they may move. This page can also list all the classes I've added and that are available and whatnot.
Used to convert an object to a JSON compliant string and back again:
string = jsonEncode(object) object = jsonDecode(string)
These could throw exceptions if the object or string cannot be converted or is otherwise malformed:
JsonCodingException
The global objects I've added are these:
- server: Controls the environment, logging, and general low-level write back to the server, etc.
- request: The incoming HTTP Request from apache through Modjs. This is the prime HTTPRequest.
- response: The outgoing HTTP Response from this script back to the client through apache and Modjs. This is the prime HTTPResponse.
Constructors on the global object now: