CairoForPHP is an application that demonstrates several functions of the Cairo implementation for PHP. It uses a technique with which, from the same source, it can run both as a desktop application with PHP-GTK and as a Web application, thus demonstrating how PHP-GTK can be used as "just one" method of output and integrated into multi-platform, multi-environment applications. The samples in CairoForPHP are fully adjustable, and code can be "dropped-in" easily in the non-Phar versions: all required additional data interfaces are XML-based. The integrated samples come both pre-rendered and in live rendering, demonstrating both abilities of Cairo here and PHP-GTK's utilization with Cairo in the realization of it. CairoForPHP uses several technologies in order to achieve all this, such as XML-based data interfaces (including XML Schema validation), PHP-GTK, Phar compatibility, Gettext integration, and others.
LanguageSys is meant to internationalize your applications. It handles the access to language files, which are based on an INI style. It is possible to precompile the language files to increase the speed of processing. This system is focused on being highly object-oriented, so it makes the language aliases aviable as member variables of the own class. It contains a system to fetch a list of all the available languages by a given directory where the language files are located. A distinction of languages is drawn as RFC1766 recommends. Examples, documentation, and a simple script to precompile your language files are included.
Simple Server provides an interface for implementing TCP socket servers by handling the connections, and sending and retrieving data to the clients that connect to the server. The class has the ability to buffer the data received from the clients. The data may be returned to the calling script in smaller chunks split by a given divider character sequence. This is convenient for line-oriented protocols with which the line break and line feed character sequence is used to delimit the protocol commands.