shortcode_manager_interface
interface shortcode_manager_interface
Interface for the Shortcode Manager.
Defines the contract for registering and rendering [middag] shortcodes.
Methods
void
register(string $tag, callable $callback)
Registers a shortcode by associating a tag with a callback function.
string
render(string $text)
Processes the given text, parses shortcode patterns, and replaces them with corresponding content.
bool
has(string $tag)
Checks whether a shortcode is registered.
void
clear()
Clears all registered shortcodes.
Details
at line 32
void
register(string $tag, callable $callback)
Registers a shortcode by associating a tag with a callback function.
at line 41
string
render(string $text)
Processes the given text, parses shortcode patterns, and replaces them with corresponding content.
at line 50
bool
has(string $tag)
Checks whether a shortcode is registered.
at line 56
void
clear()
Clears all registered shortcodes.
Intended primarily for testing context reset.