2015-09-15 04:52:02 +02:00
|
|
|
<?php
|
|
|
|
|
2016-08-19 00:51:35 +02:00
|
|
|
namespace SilverStripe\View\Parsers;
|
|
|
|
|
2015-09-15 04:52:02 +02:00
|
|
|
/**
|
|
|
|
* Abstract interface for a class which handles shortcodes
|
|
|
|
*/
|
|
|
|
interface ShortcodeHandler {
|
|
|
|
|
2016-01-26 04:56:07 +01:00
|
|
|
/**
|
|
|
|
* Gets the list of shortcodes provided by this handler
|
|
|
|
*
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public static function get_shortcodes();
|
|
|
|
|
2015-09-15 04:52:02 +02:00
|
|
|
/**
|
|
|
|
* Generate content with a shortcode value
|
2016-03-08 21:50:18 +01:00
|
|
|
*
|
2015-09-15 04:52:02 +02:00
|
|
|
* @param array $arguments Arguments passed to the parser
|
|
|
|
* @param string $content Raw shortcode
|
|
|
|
* @param ShortcodeParser $parser Parser
|
|
|
|
* @param string $shortcode Name of shortcode used to register this handler
|
|
|
|
* @param array $extra Extra arguments
|
|
|
|
* @return string Result of the handled shortcode
|
|
|
|
*/
|
|
|
|
public static function handle_shortcode($arguments, $content, $parser, $shortcode, $extra = array());
|
|
|
|
}
|