* @license http://www.apache.org/licenses/LICENSE-2.0 * @link http://phpsx.org */ class Php extends LanguageAbstract { /** * @inheritdoc */ protected function getTemplate(): string { return 'php.ts.twig'; } /** * @inheritdoc */ protected function getClientTemplate(): string { return 'php-client.ts.twig'; } /** * @inheritdoc */ protected function getGenerator(): GeneratorInterface { return new Schema\Generator\Php($this->namespace); } /** * @inheritDoc */ protected function getFileName(string $identifier): string { return $identifier . '.php'; } /** * @inheritDoc */ protected function getFileContent(string $code, string $identifier): string { $comment = '/**' . "\n"; $comment.= ' * ' . $identifier . ' generated on ' . date('Y-m-d') . "\n"; $comment.= ' * @see https://github.com/apioo' . "\n"; $comment.= ' */' . "\n"; return '