Created: 2012-03-21 03:23
Updated: 2016-11-07 20:21
License: other


Web Application Libraries

Build status::: Build Status

Library Deprecation...

This set of libraries, along with those it depends on from cs-content, is getting retired. The components are being moved into other, self-contained repositories. The hope is that this will allow for easier and more focused development. Here's the list so far:

  • AuthToken (replaces cs_authToken): Build Status
  • AuthUser (replaces cs_authUser): Build Status
  • ID Obfuscator (replaces cs_idObfuscator): (no replacement yet...)
  • Lockfile (replaces cs_lockfile): Build Status
  • Permission (replaces cs_permission): Build Status
  • Database (replaces cs_phpDB): Build Status
  • User Registration (replaces cs_registerUser): (no replacement yet)
  • DB Session (replaces cs_sessionDB): Build Status
  • Site Config (replaces cs_siteConfig): Build Status
  • Web DB Logger (replaces cs_webdblogger): (no replacement yet...)
  • Web DB Upgrade (replaces cs_webdbupgrade): (no replacement yet...)

Other libraries of note:

For info about upgrades, check the "upgrades" folder

(a.k.a. "CS-WebAppLibs" or "CSWAL")

WARNING #1: Version 0.5.x and above utilize PDO and prepared statements. Applications/libraries/frameworks that were written against a prior version may need to be rewritten to handle the differences. In theory, it is still fully backwards-compatible... but I make no guarantees.

WARNING #2: If you don't read what sparse documentation there is, you probably won't get it.

WARNING #3: This code was not written for the faint of heart. The naming conventions may be inconsistent. Some of these classes, such as the WebDBUpgrade system, is made to be transparent, so interacting with it can be difficult; others, such as the logging system, are meant to be used with little need to understand their inner-workings.

WARNING #4: Due to lack of help, the only officially-supported database is PostgreSQL. Most things should be fairly well database-agnostic, though some of the fancier features (such as transactions within the upgrade system) may not work as expected: MySQL can sometimes automatically commits changes without warning, such as when transactions cross transactionable and transactionless tables.


Unit testing was previously done with SimpleTest, but now uses (or is being converted to use) PHPUnit: this was done to help ease incorporation with Travis-CI for continuous integration testing.

Testing database interaction can be a tricky thing, and it must conform to how Travis-CI's database setup works.

To simplify things, the testing is currently only performed against a Postgres database. The settings are hard-coded:

  • User: postgres
  • Pass: (none)
  • database: _unittest_
  • host: localhost
  • port: (default)


On to the documentation...

This is a set of libraries for working with PHP-based web applications. It builds upon the foundation of CS-Content, which can be found at [ http://github.com/crazedsanity/cs-content ]; it also builds upon CS-PHPXML, which is just an XML library, and can be found at [ http://github.com/crazedsanity/cs-phpxml ].

Look at the library-specific documentation:


There are other classes implemented. As they're tested (and I have time), more documentation will be added here. For more (or less) up-to-date information, take a look at the "Developer's Corner" on CrazedSanity.com: [http://www.crazedsanity.com/content/devCorner/cs_webapplibs]


Copyright (c) 2013 "crazedsanity" Dan Falconer Dual licensed under the MIT and GPL Licenses.

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more