/** * Create Method * * Returns a type object based on the options given. * @param Frozensheep\Synthesize\Type\SynthesizeOption $objOptions The options object. * return object The object for the type created. */ public static function create(SynthesizeOption $objOptions) { $strType = TypeFactory::getType($objOptions->type); if (!class_exists($strType)) { throw new UnknownTypeException($strType); } $objObject = new $strType(null, $objOptions); return $objObject; }