Facebook\HackCodegen\CodegenFunctionish
Facebook\HackCodegen\CodegenFunctionish
Base class to generate a function or a method
Interface Synopsis
namespace Facebook\HackCodegen;
abstract class CodegenFunctionish implements ICodeBuilderRenderer {...}
Public Methods
->__construct(IHackCodegenConfig $config, string $name)->addHHFixMe(int $code, string $why): \this->addParameter(string $param): \this->addParameterf(\HH\Lib\Str\SprintfFormatString $param, \mixed ...$args): \this->addParameters(Traversable<string> $params): \this->appendToBuilder(HackBuilder $builder): HackBuilder->getName(): string->getParameters(): vec<string>->getReturnType(): ?string->isManualBody(): bool->setBody(string $body): \this->setBodyf(\HH\Lib\Str\SprintfFormatString $body, \mixed ...$args): \this->setDocBlock(string $comment): \this->setGeneratedFrom(CodegenGeneratedFrom $from): \this->setIsAsync(bool $value = true): \this->setIsMemoized(bool $value = true): \this->setManualBody(bool $val = true): \this->setName(string $name): \this->setReturnType(string $type): \this->setReturnTypef(\HH\Lib\Str\SprintfFormatString $type, \mixed ...$args): \this
Protected Methods
->appendToBuilderBase(HackBuilder $builder, string $func_declaration, bool $is_abstract = false, string $containing_class_name = ''): HackBuilder
$is_abstract and $containing_class_name only valid for CodegenMethodX for code reuse purposes->getExtraAttributes(): dict<string, vec<string>>->getFunctionDeclarationBase(string $keywords, bool $is_abstract = false): string
Break lines for function declaration->getMaxCodeLength(): int