<?php

namespace apexl\Io\modules\user\callbacks;

use apexl\Io\modules\user\services\Permissions;

/**
 * Class initialiseModules
 * Allows this module to register other module methods. E.g. Permission declarations
 * @package apexl\Io\modules\user\callbacks
 */
class initialiseModules
{
    public static function processPermissions($module)
    {
        if (method_exists($module, 'registerPermissions')) {
            $permissions = Permissions::getInstance();
            $module->registerPermissions($permissions);
        }

        return $module;
    }
}
