All pastes #343962 Raw Edit

Anonymous

public php v1 · immutable
·published 2007-02-07 12:36 UTC
rendered paste body
<?php// ------------- ~ Tango ~ ------------- \\// File: core/class_registry.php// Author: Alex Cartwright// Created: 6th February 2007// ------------- ~ Tango ~ ------------- \\	class Registry {				var $registered = array();				//---		// register() will register a file/object within the framework		// so that modules and other classes can access other classes easily		// without the need for globals		// @param string $name		// @param object $object		// @return bool		//---		function register( $name, &$object ) {			if ( !is_object( $object ) ) {				return false;			} else {				$this->registered[ $name ] = $object;			}		}				//---		// get() returns the requested object (if avaliable)		// @param string $name		// @return object || bool false		//---		function get( $name ) {			if ( isset( $this->registered[ $name ] ) && is_object( $this->registered[ $name ] ) ) {				return &$this->registered[ $name ];			} else {				return false;			}		}			}?>