public static function buildEnvironment($id, $classname) {
		//validate id
		if (!is_string($id) || empty($id))
			throw new \InvalidArgumentException("Environment id must be defined as a valid string");
		
		//validate class name
		if (!is_string($classname) || empty($classname))
			throw new \InvalidArgumentException("Parameter is not a valid environment class");
		elseif (!class_exists($classname, true))
			throw new \InvalidArgumentException("Environment class $classname was not found");
			
		$rc = new \ReflectionClass($classname);
		
		//validate if class is a valid environment
		if (!$rc->isSubclassOf('eMapper\Dynamic\Environment\DynamicSQLEnvironment') && $classname != 'eMapper\Dynamic\Environment\DynamicSQLEnvironment')
			throw new \InvalidArgumentException("Class $classname is not a valid environment class");
			
		self::$environments[$id] = new $classname();
		return true;
	}