Backend\Core\Engine\Base\Object::setModule PHP Method

setModule() public method

Set the module
public setModule ( string $module )
$module string The module to load.
    public function setModule($module)
    {
        // is this module allowed?
        if (!Authentication::isAllowedModule($module)) {
            // set correct headers
            header('HTTP/1.1 403 Forbidden');
            // throw exception
            throw new Exception('Module not allowed.');
        }
        // set property
        $this->module = $module;
    }