> For the complete documentation index, see [llms.txt](https://xoops.gitbook.io/xmf-cookbook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xoops.gitbook.io/xmf-cookbook/reference/module/helper-1/abstracthelper.md).

# AbstractHelper

The `Xmf\Module\Helper\AbstractHelper` abstract class is the base class for module aware helpers.

## \_\_construct(*$dirname*)

Instantiate a XoopsModule object for the helper to use. If the string *$dirname* is empty, the current module in XOOPS will be user. Otherwise, it will attempt to load the module by name.

## init()

init() is called by the constructor after the appropriate XoopsModule object is loaded.

## dirname()

Returns the module dirname associated with the helper.

## setDebug(*$bool*)

Set debug option for the helper on (*true*) or off (*false*.) The default for *$bool*, if not specified, is *true*.

## addLog(*$log*)

Add the message string *$log* to the module log.
