public static function factory($fd, $fromId = null) { $class = static::class; $obj = new $class($fd, $fromId); return $obj; }