---
layout: docs
title: codegenImplementsInterface
id: interface.Facebook.HackCodegen.ICodegenFactory.codegenImplementsInterface
docid: interface.Facebook.HackCodegen.ICodegenFactory.codegenImplementsInterface
permalink: /docs/reference/interface.Facebook.HackCodegen.ICodegenFactory.codegenImplementsInterface/
---
# Facebook\\HackCodegen\\ICodegenFactory::codegenImplementsInterface()




Generate a declaration that a class implements a specified interface




``` Hack
public function codegenImplementsInterface(
  string $name,
): Facebook\HackCodegen\CodegenImplementsInterface;
```




## Parameters




* ` string $name `




## Returns




- [` Facebook\HackCodegen\CodegenImplementsInterface `](<class.Facebook.HackCodegen.CodegenImplementsInterface.md>)