DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:usecounter

usecounter Plugin

Compatible with DokuWiki

  • 2024-02-06 "Kaos" unknown
  • 2023-04-04 "Jack Jackrum" unknown
  • 2022-07-31 "Igor" yes
  • 2020-07-29 "Hogfather" unknown

plugin Provides a helper that can be used in other plugins to count the occurences of any object with an arbitrary identifier.

Last updated on
2023-01-31
Provides
Helper
Repository
Source

Tagged with counter, helper

Installation

Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.

What's it for?

This plugin provides a helper class that manages the amount of occurences of any given object.

There are two simple mechanics that can be used.

  1. incUsageOf(string $id) - indicates to the helper that the object with the given identifier is used (once more). The helper internally counts the amount of uses for this identifier.
  2. amountOfUses(string $id) - returns an integer value of the amount of uses.

The helper is implemented as a Singleton instance, so a particular identifier could be used accross multiple plugins. Keep this in mind when choosing an identifier.

Syntax

There is no wiki syntax involved.

Configuration and Settings

No configuration settings available.

Development

Sources on github.

Change Log

  • 2023-01-31
    • v0.8 (Initial release)

Known Bugs and Issues

See issue tracker on github.

FAQ

None, yet.

Discussion

Start here.

plugin/usecounter.txt · Last modified: 2023-10-31 01:04 by Klap-in

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki