public static function getControllerTableInstance(string $controllerName): \Cake\ORM\Table
    {
        $tableName = App::shortName($controllerName, 'Controller', 'Controller');

        // remove vendor prefix
        if (false !== strpos($tableName, '/')) {
            $tableName = substr($tableName, strpos($tableName, '/') + 1);
        }

        return TableRegistry::get($tableName);
    }