Lord Matt's Free Stuff Area

Please do not hot link to my files. In most cases you are free to host copies yourself. Hotlinking only hurts me and might cause me to remove files. Thank you for your understanding.

ORBIT42 - BASE :: v1.01

Documentation 1.11

The base class of Orbit42.com is an opensource (free) project released with the hope that others would benifit from a class that contians the basics already. The project is hosted by sourceforge.net. If you like what you have been given please consider donating (see link at bottom of page) to cover the cost of development.

Such basics include iterative functions allowing each parent in the chain to contribute without the need for complex namespace.

$callback an array that allows a call back system to be implimented in a flexable way allowing for more than one type of call back.

$db_conn and $db_used are variables used to track a database connection. The database connection is dealt with at the lowest level and with a little skill a simple change of the base class should allow a change in database engine. This means we have some database abstraction without the cost usually attributed.

function get_ancestors() passes back all of the classes parents, and their parents and so forth back to the ORBIT42 Base class. This function is key tot he entire functionality of the base class system.

function extender_call($func) this allows basic classes to set aside user functions and have those functions used by successive generations of class without tripping over each other. This means that with each layer additional functionality can be added to the same action without any child ever overwritting the functionality of a parent.

function callback($event, $data=array(), $debug_info="") this allows all objects to trigger events in any of it's parents it also allows all children to call an event manager. What does that mean? Just like the extender_call a call back gives the option of all generations haveing access to the data to act on it but a call back uses the $callback array to summon an instence of the call back handler to call external classe and functions.

This callback method is vital to the design pattern of "loose coupling".

function db_sql_return($data, $obj = '') this function must be written for your DB engine. It process the SQL command and returns an sql result. For day-to-day data retreval one should use the more refined db_sql_return_array

function db_sql_return_array($data, $arr = array(), $formof = 'assoc') a wrapper for the db_sql_return function but it carries out the standard fildling to get the returned rows into an array. It then gives you the array so that your class need only deal with the data itself.

function db_connect() this function checks status of $db_conn and $db_used and connects if they do not contain a valid object. This has two advantages. A fall back connection setting and the ability to overwrite the connection settings with another set of connections. Further mroe a good constructor function could becreated to take objects such as $db_conn and $db_used from an earlier controller. (this function must be written for your DB engine).

function db_disconnect() this function must be written for your DB engine. It closes the connection. Generally you will want to leave this to some page controller object (depending on your projects design and specification).

Listed at Hotscripts.com

Support This Project SourceForge.net Logo

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.

You can get support for these files in the lord matt forums.

If you like what you have found here please consider connecting to/with me at any of the follwoing sites and add a recomendation.

View Matthew Brown's profile on LinkedIn

or
My Space

or Zorpia

If you requrie an invitation to do so (linkedIN for example) feel free to email me at this address.
invite [dot] me [dot] please [at] lordmatt [dot] co [dot] uk

All files have a copyright and if not marked in any given way you should assume the GNU GPL is the license.

This site is powered by Free Download Site (c) 2005 Adullam Limited, all rights reserved.
All rights of and to all content and files on this site remains the propety of the copyright holder.

A wise man should have money in his head, but not in his heart. ~Jonathan Swift

This Site has adverts and links because part of the ethos of this quest is that t should cost nothing else to any one else. These adverts help to pay for the domain, hosting and bandwidth. Donaitions are also welcome.



Empty pockets never held anyone back.
Only empty heads and empty hearts can do that. ~Norman Vincent Peale

Lord Matt of moreturf.com, money doubled

When I make stuff that is digital (most of it is) then I want to share. This is where I offer them for download. Free. I do this because I am nice - I don't get paid for it. mostly these downloads are things I have written in PHP like the NucleusCMS plugins

Almost all files are ZIPped which means you will need a zip program like winzip or PKZip to unpack them... but then if you are used to working with php you would know this already

I am happy to support my work if I can but please remember that I am just one man.

The Gaiaonline.com assistant (GOA) was here too but I no longer feel it is good to work on it.


Usefull Links