Location: PHPKode > projects > Monyet > classes/holderfactory.php
<?php

//Factory Class

Class HolderFactory {

	public function __construct(){}

	static public function create($tablename){
		if($tablename[0]=='p'){
			return new PingHolder($tablename);
		}
		else
		if($tablename[0]=='s'){
			return new ServiceHolder($tablename);
		}
		else
		if($tablename[0]=='m'){
			return new SNMPHolder($tablename);
		}else{
			die('HolderFactory: Tablename not recognized');
		}

	}
}
?>
Return current item: Monyet