public function shortCode($text)
    {
        $patterns = [
            '/\[(FIGURE)[\s+](.+)\]/',
            '/\[(BASEURL)\]/',
            '/\[(RELURL)\]/',
            '/\[(ASSET)\]/',
        ];

        return preg_replace_callback(
            $patterns,
            function ($matches) {
                switch ($matches[1]) {

                    case 'FIGURE':
                        return CTextFilter::shortCodeFigure($matches[2]);
                        break;

                    case 'BASEURL':
                        return CTextFilter::shortCodeBaseurl();
                        break;

                    case 'RELURL':
                        return CTextFilter::shortCodeRelurl();
                        break;

                    case 'ASSET':
                        return CTextFilter::shortCodeAsset();
                        break;

                    default:
                        return "{$matches[1]} is unknown shortcode.";
                }
            },
            $text
        );
    }