My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php

class Skjb_Db_Table_Registry
{
private static $_tables = array();

public static function getTable($name)
{
if (!isset(self::$_tables[$name])) {
$tableName = ucwords(substr($name, 0, -5)) . '_Table';
self::$_tables[$name] = new $tableName();
}

return self::$_tables[$name];
}
}

Change log

r59 by superhappycamperboy on May 26, 2010   Diff
Moving everything to the library subfolder
Go to: 
Project members, sign in to write a code review

Older revisions

r52 by superhappycamperboy on May 25, 2010   Diff
Adding table registry and validators
All revisions of this file

File info

Size: 376 bytes, 16 lines
Powered by Google Project Hosting