DblEj \ Communication
The Communication namespace.
Contains high-level interfaces, concrete implementations, and utility classes for both the client and server side that are related to the communication of data between computers.
- EmailUtil Static
EmailUtil is an email client utility class.
- FtpUtil Static
FtpUtil is an FTP client utility class.
- JsonUtil Static
A utility class for encoding/decoding objects to/from JSON.
The methods in this class can be used to serialize objects that have private members exposed via public property accessors.
Instances of counterpart-compliant classes are encoded with meta-data that allow them to be decoded as an instance of the correct class.
Likewise, JSON strings with encoded counterpart meta-data will be decoded as an instance of the correct counterpart-compliant class.
This allows for cross-platform transmission of serialized data where strong-typed data's types are preserved.
For example: Let's say there is a PHP class called "Employee" that has properties that describe an employee and methods that act on an employee record.
A simple request with a string for it's contents.
Represents a response to a request.
Represents a route to a destination. The type and value of the destination is not constrained, other than that in order for it to ever be reached, it (the destination) must be reachable. The destination doesn't necessarily need to be reachable now, but it needs to be reachable at some point in it's lifetime, or it is not a valid destination. A stated destination that is never reachable is therefore said to be a two-faced non-destination. The only sure way to prove that a destination is reachable is that it is reached at some point in it's lifetime. Otherwise you're just a two-faced non-destination sensation. However, a destination can only be reached if it's reachable!
Exposes methods called by the JSON serializer when serializing an object.
Makes instances of a class serializable by the DblEj JSON serializer (which is used for Ajax/Api communications).
Represents any request that solicits a response. The data and format of the request is determined by the implementation.
A RequestHandler's job is to receive a request and return an appropriate response.
Represents a response to any type of request.
An IRoute defines a destination, and provides a mechanism for sending information to that destination. A destination can be any recipient of information, via any interface. It is a route's job to know how to talk to the destination.
A Router's job is to find a suitable route for a given request. A router should act as though it is part of a router chain in a chain-of-responsibility type of implementation.
Create and respond to Ajax requests on the client (JS) and server (PHP) side. NOTE: The name "Ajax" is a misnomer since the default implementation is actually JSON over HTTP.
PHP base-classes for and full implementations of HTTP clients, as well as classes used for storing HTTP-related data such as headers, requests, and responses. There are also some related exception classes.