Skip to content

jaz303/base-php

Repository files navigation

BasePHP

Overview

BasePHP is a small, general PHP class library. It’s written to take advantage of the new features offered by PHP 5.3 which, given my current work-rate, will probably be in wide-use by the time this library is complete.

Main features:

  • Object oriented database access with support for:
    • lazy connection via instance registry
    • smart(er) automatic value quoting
    • exception wrapping for catching constraint violations
    • automatic conversion/instantiation of boolean/date types
    • table creation
    • migrations
  • Date & time classes
  • Powerful “rewire” feature which automatically creates wrapper objects for file uploads and submitted date/currency values
  • Currency class
  • ISO country/language data
  • MIME type handling
  • Image class supporting chainable operations, resizing, cropping and filtering (maybe coming back soon)

BasePHP is designed to use class autoloading – if you don’t like this, this library isn’t for you.

Installation

Very simple, just copy the contents of the “inc” directory into your include root. You’ll probably want to add a couple of lines to your master include file to make your life easier – just check out ‘configure.php’ for details.

BasePHP currently includes no files intended for deployment to the webroot (stylesheets, scripts, images etc.). This may change in a future version if I start adding support for JavaScript libraries. Don’t hold your breath, however.

Running Tests

You can run the tests directly from the shell. For example:

jason@ratchet ~ $ cd $BASE_PHP_ROOT jason@ratchet base $ php run_tests.php

Feedback and Contributions

To report bugs, email me at jason@onehackoranother.com
If you’d like to contribute, drop me a line at the same address, or fork the project and send a pull request.

About

General purpose PHP class library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages