---
layout: docs
title: setContainingClass
id: class.Facebook.HackCodegen.CodegenMethodish.setContainingClass
docid: class.Facebook.HackCodegen.CodegenMethodish.setContainingClass
permalink: /docs/reference/class.Facebook.HackCodegen.CodegenMethodish.setContainingClass/
---
# Facebook\\HackCodegen\\CodegenMethodish::setContainingClass()




``` Hack
public function setContainingClass(
  Facebook\HackCodegen\CodegenClassish $class,
): this;
```




## Parameters




+ [` Facebook\HackCodegen\CodegenClassish `](<class.Facebook.HackCodegen.CodegenClassish.md>)`` $class ``




## Returns




* ` this `