Framework 0.1.1

A minor release that addresses a few small bugs and addresses some minor issues with where the database connection is stored. A recommended upgrade for anyone using Framework.

  • Fixed bug in query logic in Framework_User::__construct()
  • Added Framework_Auth_User
  • Added DB::disconnect() to Framework::stop()
  • Moved DB connection to Framework::$db so static methods can access the DB connection

Download Framework 0.1.1

10 thoughts on “Framework 0.1.1

  1. better make that 4 people 🙂

    Actually, I’m not using framework yet, I’m rewriting my own mashed up php4 version.

    I was about to post asking about the multiple sites install thing (hey, even our crappy pseudo mvc framework is a one install per server!), but I thought I’d better check for an update.

    The other thoughts I had which had implemented (and we like)… config.php outside of docroot, possibly templates and modules to live outside of docroot.

    Just rambling out loud, but I thought a nice separation (again, kinda what we’re doing now) may be to run the framework in one place, then modules and templates for each site under a “siteroot”, then index.php in the docroot.


    /web/ – site root
    /web/ – module dir
    /web/ – docroot for cname www
    /web/ – docroot for cname secure

    etc etc

    The only real thing I’m unhappy about and mulling over is the sprawl of .tpl files and .php class files for each module/event

    With our ASP (that’s hosted application), we run multiple rebranded applications, so it’d be crazy to scale and manage if we had, say 25 people on one server using the code base… (ie, 25 x say 150-200 templates) ouchies.

    Anyway, I’ll slink off to think more about this…

    (and g’day from sunny sydney, australia!)

  2. Snowy,

    Actually, the new Framework will use the default module templates so there shouldn’t be a need to have module templates for *each* site. You will, of course, need page templates (the outer part of the page) for each site and you can override modules in your site directories. Check out Framework_Site for more information, but here’s a brief overview …

    In your docroot …

    Framework/Module/Welcome.php -> master module for all sites
    Framework/Module/Site/MySite/Framework/Module/Welcome.php -> Welcome module for the site MySite

    This happens because Framework_Site::factory() alters your include path so that you can affectively override modules on a site-by-site basis.

    Currently, I don’t have a mechanism for automagically overriding *templates* without overriding the module.

    As for the configs and such … I tried to make it as simple as possible to get things up and running, but you could probably do some hacking in your site classes to put configs and templates outside of the docroot (this isn’t something that worries me and, to be perfectly honest, I’ve never understood why people get freaked out by this).

  3. The multiple sites stuff is v. cool, checking it out now.

    The reason for config – I guess while we’re talking about separation – there’s no reason for config, class modules, includes or templates to be inside the docroot. The philosophy is you can’t always control the environment, ie, if php breaks on the server (eg, if you don’t control the hosting environment or if there’s is a bug in a version of php) and somehow your config.php becomes listed as a text/html.

    In the same way I don’t like having class files in the docroot either, nor naming things – templates are acceptable in the docroot, but again they are exposing unecessary risk because it all depends on who’s using the templates and what’s in the code.

    Remember what is in the docroot is freely available to the world; just obscured.

    All these preferences are aimed more for a multi-developer/cross-platform environment… ie, trust no one! 🙂

    So, it’s not a case of being freaked out, it’s more about being conciously careful.

  4. Hi Again,

    Sorry that I commented on the wrong entry before. This and my previous comment were meant for Framework, not DB_Virtual.

    Not sure if you have a preferred place for people to report what they view as “bugs”, but I’ll toss it here until told otherwise.

    In Module.php, Framework_Module class, the regex for matching the function name disallows underscores in the rest of the function name. My guess is you were trying to enforce camel-case functions, but afaik, something like validate_level is just as legit as validateLevel. Changing it to /^([_A-Z])([_A-Z0-9]+)$/i would fix that, I believe. That change also makes the first character have to occur only once (indicating the first character be legal by coding standard definitions).

    Cheers, Brendyn

  5. hi, there are some more problems to point at: how do you prevent people from calling FR_Module_XYZ::__destruct() for example? i mean you could easily call every method you want to by manipulating $_GET[‘event’]. or what if the called method simply doesn’t exist? i think there needs to be a device to tell whether or not a event is valid or at least some sort of seperation between event methods and non-event methods.

  6. Hello Mr. Stump,

    Can you post or tell me where I can find, a complete example of how to use the version 0.1.1 of you framework?


  7. hey – just read the onlamp articles and wanted to download framework- what happened to versions > 0.0.7????

  8. Hi Joe,

    very good job on the framework. I started using it myself and was very impressed with your way of thinking objects.

    I was looking for a framework like that for quite some time and yours got as close as possible to what I was looking for.

    Although a few day ago I discovered that Zend brought out a preview of the Zend Framework, which is quite similar in many regards to what you have been doing.

    Politics force me to switch at this early stage of developement to the most likely industry leader (which unfortunately is not you) but I wish you’d team up with Zend and enrich their framework with your ideas.

    All the best from Germany,


  9. I would like to use this for my website but when I went to install with pear I get an error.

    Try to install:
    pear install “”

    No handlers for package.xml version 2.0


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.