This class is meant to create hash strings that are used as keys to store private data.
The hash strings and the private data are stored in a database table so it can verified securely only on the server side. This capability can be for instance to prevent link stealing.
You may construct an hash string from:
- Session id of the user
- Private data of the server
- Private data of the web site
- An item to check
- Timestamp of a query
- A maximum number of accesses
- A maximum duration
Next, in another page, the class can check whether the hash is valid by passing as parameter in the UL, depending on:
- The item to check
- The session id of the user
- The private data of the server
- The private data of the Web site
- The moment when the has was saved in database
- The moment and the number of the access
Check whether variable values match expected types
This class can be used to check the values of given PHP variables and verify whether they contain values of the expected types.
It provides many functions that can check whether given values are of the basic PHP types: array, boolean, double, integer and string.
It may also check whether the tested values are objects of a given class or sub-class, a callable function, a valid resource handle, the path of a directory, regular file, executable program, readable or writable file, an uploaded file, or symbolic link, a finite or infinite number, or not a number.
When the values do not match the expected types, the class triggers an error denoting the line and the script file where the check was performed.
This package can be used to manipulate type safe objects in a way that works with PHP caching extensions.
It provides base classes that can check whether the types of the values to assign variables of implementation subclasses are of the expected types.
The expected types are determined by the prefixes of private variables, so it works well even when using PHP compiled code cached extensions.
An additional class can serialize objects as XML documents or to insert them in database tables.
The goal of this class is not to replace ORM or other db classes. It shall replace
the stdClass when using mysql_fetch_object.
It returns a value type object for each column. There are a number of value types:
These value types have specific sets of methods. i.e. TTimestamp value types are working
internally with the php native DateTime class.
TString has a bunch of methods to manipulate the output string.