'', 'description' => '', 'endpoint' => 'https://localhost', 'version' => '1.0.0', 'terms' => '', 'support.email' => '', 'support.url' => '', 'contact.name' => '', 'contact.email' => '', 'contact.url' => '', 'license.name' => '', 'license.url' => '', ]; public function __construct(App $app, array $services, array $routes, array $models, array $keys, int $authCount) { $this->app = $app; $this->services = $services; $this->routes = $routes; $this->models = $models; $this->keys = $keys; $this->authCount = $authCount; } /** * Get Name. * * Get format name * * @return string */ abstract public function getName(): string; /** * Parse * * Parses Appwrite App to given format * * @return array */ abstract public function parse(): array; /** * Set Param. * * Set param value * * @param string $key * @param string $value * * @return self */ public function setParam(string $key, string $value): self { $this->params[$key] = $value; return $this; } /** * Get Param. * * Get param value * * @param string $key * @param string $default * * @return string */ public function getParam(string $key, string $default = ''): string { return $this->params[$key] ?? $default; } protected function getEnumName(string $service, string $method): ?string { switch ($service) { case 'account': switch ($method) { case 'createOAuth2Session': return 'Provider'; } break; case 'avatars': switch ($method) { case 'getBrowser': return 'Browser'; case 'getCreditCard': return 'CreditCard'; case 'getFlag': return 'Flag'; } break; case 'storage': switch ($method) { case 'getFilePreview': return 'ImageGravity'; } break; } return null; } }