1
0
mirror of https://github.com/pierre42100/ComunicAPI synced 2025-07-06 10:02:53 +00:00
Files
3rdparty
RestControllers
bin
classes
components
models
.htaccess
APIClients.php
Components.php
DBLibrary.php
URLanalyzer.php
comunicAPI.php
config.php
config
functions
helpers
.gitignore
.htaccess
LICENSE
README.md
db_struct.sql
index.php
init.php
ComunicAPI/classes/Components.php
2018-04-15 14:42:35 +02:00

34 lines
639 B
PHP

<?php
/**
* Components unificator
*
* @author Pierre HUBERT
*/
class Components {
/**
* A static table that contains all the object
*
* @var array
*/
private static $objects = array();
/**
* Public constructor
*/
public function __construct(){
//Transform static object into dynamic object
foreach(self::$objects as $name=>$object)
$this->{$name} = $object;
}
/**
* Class registration
*
* @param String $className The name of the class to register
* @param Object $object The object to register
*/
public static function register($className, $object){
self::$objects[$className] = $object;
}
}