Web application framework containing various libraries, an extension to cs-content


Web Application Libraries

Build status::: Build Status

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:

  • Template: from cs-content, "cs_genericPage"; crazedsanity/template
  • Core: from cs-content, the core libraries; crazedsanity/core
    • ToolBox (previously cs_globalFunctions)
    • Version (previously cs_version)
  • SiteConfig: from cs-webapplibs, previously cs_siteConfig; crazedsanity/siteconfig
  • Database: from cs-webapplibs, previously cs_phpDB; crazedsanity/database

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 [ ]; it also builds upon CS-PHPXML, which is just an XML library, and can be found at [ ].

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 []


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