function create($class_name) { DataMapperFactory :: _includeClassFile($class_name); $mapper =& new $class_name(); if(!is_a($mapper, 'AbstractDataMapper')) die($class_name . ' does not implement AbstractDataMapper interface'); return $mapper; }
public function createDataMapper($mapper_path) { include_once(LIMB_DIR . '/class/core/data_mappers/DataMapperFactory.class.php'); return DataMapperFactory :: create($mapper_path); }