| Contents | Rss2Feed.class.php | class Rss2Feed |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Provides rendering one or more RSS channels into a RSS XML text. | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2010 |
GeoIpLookup.class.php | class GeoIpLookup |
|---|
| Package | de.atwillys.sw.php.swlib.util | | Version | 1.0 | | Description | Performs a lookup at http://ipinfodb.com | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2010 |
UserVerificationImage.class.php | class UserVerificationImage |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Creates a verification image for human user verification. | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2010 |
ZipFile.class.php | class ZipFile |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Wrapper class for ZipArchive with exceptions. Provides simple functions
to compress, list and extract files or folders (recursively). | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2007-2010 | | Uses | ZipException |
ZipException.class.php | class ZipException extends Exception |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Exception thrown by class ZipFile | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2007-2010 |
XmlConverter.class.php | class XmlConverter |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | XML handling. Generates XML output from an associative cascaded array. | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2006-2010 |
Versioning.class.php | final class Versioning |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Library version checking and reporting class. Scans a package source
directory for files, builds SHA1 and MD5 checksums for of each file and
(if PHP) fetches additional information about documented classes and
interfaces. The static function publishModule() allows to zip a package
source directory and generate info files containing the checksums, details,
version, readme and license and publish all this in a reporitory folder
(which has to be writable). The function checkModuleVersion() performs a
HTTP lookup to a repository generated by the function publishModule(),
compares version, checksum and details and reports a recommendation if the
the package has to be updated or not. | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2010 |
UtcDate.class.php | class UtcDate implements IDate |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | UTC refered dates and related operations. | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2005-2010 | | Uses | IDate |
UnitTest.class.php | abstract class UnitTest |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Unit test base class. | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2005-2010 |
Tracer.class.php | class Tracer |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Main tracing class, can be extended.
Traces to output window when Tracer::stop() is called
if the trace level > 0 or an uncaught Exception occured.
- Name of recipient: $GLOBALS['config']['admin.name']
- EMail of recipient: $GLOBALS['config']['admin.email']
The trace level is automatically set if $_GET['trace'] > 0
The trace level is saved in $_SESSION.
There is the possibility to set a default trace level using
- define('TRACER_DEFAULT_LEVEL', <INT VALUE>). This should be
for debugging only.
If you want to force the Tracer being off (not seen by any
unauthenticated user) simply call Tracer::disable(); | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2007-2010 |
swlib.class.php | final class swlib |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | SW PHP Library Core class. Organizes autoloading, settings import/export,
and initializes all classes/modules to enable the features:
- Exception handling
- Tracing
- Session management
- Output bufferung
- Update check of the whole package de.atwillys.sw.php.swLib
Furthermore, it normalizes the GET,POST, etc input according to magic quotes
(which are ALL removed). | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2005-2010 | | Uses | Tracer, EException, OutputBuffer, Session |
ShellProcess.class.php | class ShellProcess |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Shell execution wrapper. Provides executing a shell program, passing input
to the STDIN of the process (virtually typing in the console window), and
fetching STDOUT (normal output) and STDERR (error output). Furthermore the
child process is terminated if the script is finished. This prevents higher
cpu load for no reason. You can specify not to terminate the process as well.
The output is passed to the callback methods onStdOut() and onStdErr(), which
just print the contents. Overload these methods to handle the output yourself.
All overloadable methods:
- onProcessStarted(): Called when the process was just started
- onProcessFinished(): Called when the process exists
- onProcessRunning(): Called regularely when the process is running
- onStdOut(): STDOUT processing
- onStdErr(): STDERR processing | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2009-2010 |
Session.class.php | class Session |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Session management wrapper. This class can be used to replace the PHP standard
session handling. Principally this class does nothing differemt, but the class
can be easily replaced with a database-based session handling or the like. | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2005-2010 |
ResourceFile.class.php | class ResourceFile implements ITracable |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Resource file class, implemented to manage downloads and uploads of files.
Provides HTTP-Range (partial download), ETAG, If-Modified-Since, auto
detection of the mime type, and cache control.
Base for downloadable or requestable
resources saved in a database or as
files. Provides mime type handling
and output with http header information. | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2007-2010 | | Uses | FileSystem, Tracer |
PhpCode.class.php | final class PhpCode implements ITracable |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | PHP code information and execution. The evaluateSandboxed() should work
even if PEAR is not installed (no class SandBox), but safemode should be
disabled because PHP has to be executed in the shell. This means longer
processing time as well. | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2007-2010 | | Uses | Tracer |
OutputBuffer.class.php | class OutputBuffer implements ITracable |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Enables auto output buffering by calling ob_start() at construction and
ob_end_flush() on destruction. You can overload the onEnd() method to
add special processes to the buffered content. It is also possible to
create instances, e.g. $ob = new OutputBuffer(); print "Something";
$content = $ob->getContents(); | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2005-2010 | | Uses | Tracer |
MySqlException.class.php | class MySqlException extends Exception |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Exception thrown by class MySql and MySqlAdministration | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2007-2010 |
MySqlAdministration.class.php | class MySqlAdministration extends MySql |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | MySQL backup / restore and administrative tools. Backups the whole database
(or only a part) into a ZIP file, including an info file. The restore function
accepts the ZIP file and is able to restore the database (with table creations). | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2009-2010 | | Uses | Tracer, MySql, MySqlException, FileSystem, ZipFile |
MySql.class.php | class MySql implements ITracable |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | MySQL wrapper, which provides auto connect/disconnect, normal SQL query,
escaping, and special query methods like queryInsertInto(), queryDeleteFrom(),
queryUpdate(), query to objects, query information about the database or
tables - all kind of queries you use regularely. | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2007-2010 | | Uses | MySqlException, Tracer |
MenuTreeRenderer.class.php | class MenuTreeRenderer extends MenuRenderer |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Standard implementation of rendering for class Menu. In this case a tree
menu is rendered. | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2005-2010 | | Uses | MenuRenderer |
MenuRenderer.class.php | class MenuRenderer |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Menu rendering for class Menu. Overload the functions of this class to define
the way your menu is rendered. | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2005-2010 |
Menu.class.php | class Menu |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Recursive Menu managing class. Accepts a cascaded associative array with
defined entries. The keys of these entries are configurable, but the
functionality is:
- There is a reference the node list (the cascaded array)
- Each entry has an optional children entry that contains similar sub nodes.
If children are defined, the class will recursively process this entries.
- Each entry has an optional key/value pair that defines if the entry is
hidden. In this case the enry will be skipped.
- Each entry has an optional key/value pair that defines if the entry is
active. This will be marked in the renderer to perform an alternative
rendering output (e.g. text-color:red)
- There is a rendering class that contains only callbacks for "Start Menu",
"End Menu", "Open Folder", "Close Folder", "Menu Item". | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2005-2010 | | Uses | MenuRenderer |
MathException.class.php | class MathException extends Exception |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Exception thrown by the class Math. The EException throws this exceptions as
well in case of a "division by zero" warning. | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2007-2010 |
Math.class.php | class Math |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Math class for tasks that have to do with statistics and other Math stuff.
IMPORTANT: Take care with the variable types you use! PHP has functions that
return float instead of double. This is a big issue of this language. Try to
avoid type conversion from double to other types and back. | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2005-2010 | | Uses | MathException |
Mailer.class.php | class Mailer |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Simple SMTP EMail wrapper class. Nothing special. | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2007-2010 | | Uses | IEMailContact |
LocalDate.class.php | class LocalDate extends UtcDate implements IDate |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Local time refered dates: same as UtcDate for local date/times. It is
assumed that $datetime (if numeric) is a local timestamp (form time() ) | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2005-2010 | | Uses | UtcDate, IDate |
LaTexRenderer.class.php | class LaTeXRenderer |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Renders LaTeX to a png image. The rendering class has an own cache based on
the checkums of the fomulas. If a new formula is entered specified, then the
rendering process will run, and create the cache file. The callback
onTexFilter() can be overloaded to add an own filter, e.g. to prevent too long
texts, shell commands or require HTTP authentication to render formulas. | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2010 |
ITracable.class.php | interface | ITracable |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Defines if a class is ITracable. Implemented in all classes that require
the Tracer. | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2006-2010 | | Interface | ITracable |
IniFile.class.php | class IniFile |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Initialisation file access. Load/save availability. Sections and
keys are accessable using the public data array. | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2008-2010 |
IEMailContact.class.php | interface | IEMailContact |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | EMail contact interface, used in class Mailer and implemented in class
EMailContact. | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2006-2010 | | Interface | IEMailContact |
IDate.class.php | interface | IDate |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | UTC/Local date interface. Implemented in class UtcDate, LocalDate. | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2005-2010 | | Interface | IDate |
HttpRequest.class.php | class HttpRequest |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Http socket request wrapper | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2008-2010 | | Class | HttpRequest |
HttpAuthentificationException.class.php | class HttpAuthentificationException extends Exception |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Http authentification exception, thrown if the authentication fails | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2008-2010 |
HttpAuthentification.class.php | class HttpAuthentification |
|---|
| Package | de.atwillys.sw.php.swLib | | Description | Http authentification wrapper with external user management. The registered
users are passed in the constructor/function addUser in an associative array,
where the keys are the user login names and the values the ENCRYPTED passwords.
The encryption function is the UNIX crypt(). The static function createPassword()
can be used as well. To activate the feature call
try {
HttpAuthentification::requireAuthentication();
} catch(HttpAuthentificationException $e) {
...
} | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2008-2010 | | Uses | HttpAuthentificationException |
GregorianMonthCalendarRenderer.class.php | class GregorianMonthCalendarRenderer |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Gegorian Month Calendar renderer. Overwrite this class if you want to have an
alterantive rendered representation of the month calendar. | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2010 | | Uses | GregorianCalendar, GregorianCalendarEvent |
GregorianDayCalendarRenderer.class.php | class GregorianDayCalendarRenderer |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Gegorian Day Calendar renderer class. Overwrite this class if you want a
different rendered representation. | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2010 | | Uses | GregorianCalendar, GregorianCalendarEvent |
GregorianCalendarEventController.class.php | class GregorianCalendarEventController |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Gegorian Calendar event controller. Overwrite the methods to customize
the controller (load from file, from database etc. The class ist not
abstract because it will be instantiated by the calendar if no derived
controller is specified. This class methods returns empty date, which have
no effect.) | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2010 | | Uses | GregorianCalendarEvent |
GregorianCalendarEvent.class.php | class GregorianCalendarEvent |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Base class for Gegorian Calendar Events. Events are defined using a unique
identifier (e.g. the primary key of a database or file), a start timestamp
and an end timestamp. The configuration of the GregorianCalendar class
decides if these timestamps are interpreted as local or UTC. Further "fixed"
properties are the type of event (e.g. "meeting", "festival" ...) and an
associative data array that contains variable information about the particular
event. All keys in the array can be accessed like properties (if e.g.
$data = array(
'where' => 'there',
'who' => 'me',
'why' => 'because'
);
Then $event->where === 'there'.
Note that you should choose "PHP-variable-name-conform" array keys for this,
alternatively you can use the data getter: $event->getData("who") === "me". | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2010 |
GregorianCalendar.class.php | class GregorianCalendar |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Gegorian Calendar management with the ability to render day calendars and
month calendars using the corresponding rendering classes. Also manages
the events for selected time spans. | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2010 | | Uses | GregorianCalendarEvent, GregorianCalendarEventController, GregorianDayCalendarRenderer, GregorianMonthCalendarRenderer |
FileSystemException.class.php | class FileSystemException extends Exception |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Exception thrown by class FileSystem | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2007-2010 |
FileSystem.class.php | class FileSystem |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | FileSystem operations (in general wrappers for already existing PHP functions)
with exceptions. Implemented static functions are e.g. checking if a file,
directory, link exists, recursively find files and folders with filtering,
single command file I/O, file basename, dirname, extension, and retrieving
system directories and temporary files. | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2007-2010 | | Uses | FileSystemException |
EMailContact.class.php | class EMailContact implements IEMailContact |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | EMail contact is a base class for the class Mailer. It can be easily be
extended to any other addressbook or user class (Note that it might be
be better to write an own user class and implement IEMailContact instead
of using this class). | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2006-2010 | | Uses | IEMailContact |
EException.class.php | class EException extends Exception |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Implements global error, assertion and exception handling. Errors, warnings
and messages are categorized and either thrown as exception or only traced
(e.g. warnings, messagses). A global exception handler catches uncaught
exceptions, traces the details and prints a HTML error text (without details,
as a MySqlException('You have an error near SELECT * form users where password=...')
is nothing to be seen by the user. Assertions are only traced. | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2006-2010 | | Uses | Exception, (optional) Tracer |
Cache.class.php | class Cache |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 0.1 | | Description | Cache management class with GZ compression and uncompress caching of
contents and files. Package caches are stored in sub directories. Each
resource is defined by the SHA1 checksum.
NOTE: THIS CLASS IS BEING DEVELOPED | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2010 |
ArrayFilter.class.php | class ArrayFilter |
|---|
| Package | de.atwillys.sw.php.swLib | | Version | 1.0 | | Description | Provides static functions for simple array filtering and finding tasks. | | Author | Stefan Wilhelm | | License | GPL | | Copyright | Stefan Wilhelm, 2007-2010 |
|