first php framework

Associate
Joined
4 Mar 2007
Posts
315
Location
United Kingdom
Ok so it's my first time developing a small framework for myself, just to make life a little easier, I have created an Abstraction Layer for the database, however I am not entirely sure how I can shorten some functionality within it. Maybe you could help me,

I have a configuration file which stores all defines such as the database connectivity.

I have a registry which deals with storing objects from an object folder (database class) which is pre instantiated upon the execution of a command called - $registry::ADD_OBJECT('db'); this will then instantiate my db class so I can make references to functions inside of that like so:

$registry::GET_OBJECT('db')->query('users');
$registry::GET_OBJECT('db')->rows(5); // display the first 5 results.

however is there any way I can perhaps shorten the initial part down, by loosing the $registry? or even combining the $registry with GET_OBJECT. like

rGET_OBJECT->query('users');

any help would be great, theres no point giving the source as the file amount of lines is crazy, however any methods you can advise on would be brilliant.
 
ahh brilliant, ok.
I love the fact that the framework has cut my production time by an absolute load so far, such a handy app, first one i've made which actually works :p

Thanks anyway
 
Back
Top Bottom