View sourcecode

The following files exists in this folder. Click to view.

phpdoc-cache-file_1baa8c69141463ee3f96cb8703675ba3.dat

1 lines UTF-8 Unix (LF)
1
O:39:"phpDocumentor\Descriptor\FileDescriptor":22:{s:7:"*hash";s:32:"8feed640e436154babfe6ab746b4b082";s:7:"*path";s:23:"Content/CTextFilter.php";s:9:"*source";s:7668:"<?php

namespace Anax\Content;

/**
 * Filter and format content.
 *
 */
class CTextFilter
{
    use \Anax\TConfigure,
        \Anax\DI\TInjectionAware;



    /**
     * Call each filter.
     *
     * @param string $text    the text to filter.
     * @param string $filters as comma separated list of filter.
     *
     * @return string the formatted text.
     */
    public function doFilter($text, $filters)
    {
        // Define all valid filters with their callback function.
        $callbacks = array(
            'bbcode'    => 'bbcode2html',
            'clickable' => 'makeClickable',
            'markdown'  => 'markdown',
            'nl2br'     => 'nl2br',
            'shortcode' => 'shortCode',
        );

        // Make an array of the comma separated string $filters
        $filter = preg_replace('/\s/', '', explode(',', $filters));

        // For each filter, call its function with the $text as parameter.
        foreach ($filter as $key) {

            if (isset($callbacks[$key])) {
                $text = call_user_func_array([$this, $callbacks[$key]], [$text]);
            } else {
                throw new \Exception("The filter '$filter' is not a valid filter string.");
            }
        }

        return $text;
    }



    /**
     * Helper, BBCode formatting converting to HTML.
     *
     * @param string $text The text to be converted.
     *
     * @return string the formatted text.
     *
     * @link http://dbwebb.se/coachen/reguljara-uttryck-i-php-ger-bbcode-formattering
     */
    public function bbcode2html($text)
    {
        $search = [
            '/\[b\](.*?)\[\/b\]/is',
            '/\[i\](.*?)\[\/i\]/is',
            '/\[u\](.*?)\[\/u\]/is',
            '/\[img\](https?.*?)\[\/img\]/is',
            '/\[url\](https?.*?)\[\/url\]/is',
            '/\[url=(https?.*?)\](.*?)\[\/url\]/is'
        ];

        $replace = [
            '<strong>$1</strong>',
            '<em>$1</em>',
            '<u>$1</u>',
            '<img src="$1" />',
            '<a href="$1">$1</a>',
            '<a href="$1">$2</a>'
        ];

        return preg_replace($search, $replace, $text);
    }



    /**
     * Make clickable links from URLs in text.
     *
     * @param string $text the text that should be formatted.
     *
     * @return string with formatted anchors.
     *
     * @link http://dbwebb.se/coachen/lat-php-funktion-make-clickable-automatiskt-skapa-klickbara-lankar
     */
    public function makeClickable($text)
    {
        return preg_replace_callback(
            '#\b(?<![href|src]=[\'"])https?://[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/))#',
            function ($matches) {
                return "<a href=\'{$matches[0]}\'>{$matches[0]}</a>";
            },
            $text
        );
    }



    /**
     * Format text according to Markdown syntax.
     *
     * @param string $text the text that should be formatted.
     *
     * @return string as the formatted html-text.
     *
     * @link http://dbwebb.se/coachen/skriv-for-webben-med-markdown-och-formattera-till-html-med-php
     */
    public function markdown($text)
    {
        return \Michelf\MarkdownExtra::defaultTransform($text);
    }



    /**
     * For convenience access to nl2br
     *
     * @param string $text text to be converted.
     *
     * @return string the formatted text.
     */
    public function nl2br($text)
    {
        return nl2br($text);
    }



    /**
     * Shortcode to to quicker format text as HTML.
     *
     * @param string $text text to be converted.
     *
     * @return string the formatted text.
     */
    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
        );
    }



    /**
    * Init shortcode handling by preparing the option list to an array, for those using arguments.
    *
    * @param string $options for the shortcode.
    *
    * @return array with all the options.
    */
    protected static function shortCodeInit($options)
    {
        preg_match_all('/[a-zA-Z0-9]+="[^"]+"|\S+/', $options, $matches);

        $res = [];
        foreach ($matches[0] as $match) {
            $pos = strpos($match, '=');
            if ($pos == false) {
                $res[$match] = true;
            } else {
                $key = substr($match, 0, $pos);
                $val = trim(substr($match, $pos+1), '"');
                $res[$key] = $val;
            }
        }

        return $res;
    }



    /**
     * Shortcode for <figure>.
     *
     * Usage example: [FIGURE src="img/home/me.jpg" caption="Me" alt="Bild på mig" nolink="nolink"]
     *
     * @param string $options for the shortcode.
     *
     * @return array with all the options.
     */
    protected static function shortCodeFigure($options)
    {
        extract(
            array_merge(
                [
                    'id' => null,
                    'class' => null,
                    'src' => null,
                    'title' => null,
                    'alt' => null,
                    'caption' => null,
                    'href' => null,
                    'nolink' => false,
                ],
                CTextFilter::ShortCodeInit($options)
            ),
            EXTR_SKIP
        );

        $id = $id ? " id='$id'" : null;
        $class = $class ? " class='figure $class'" : " class='figure'";
        $title = $title ? " title='$title'" : null;

        if (!$alt && $caption) {
            $alt = $caption;
        }

        if (!$href) {
            $pos = strpos($src, '?');
            $href = $pos ? substr($src, 0, $pos) : $src;
        }

        $a_start = null;
        $a_end = null;
        if (!$nolink) {
            $a_start = "<a href='{$href}'>";
            $a_end = "</a>";
        }

        $html = <<<EOD
<figure{$id}{$class}>
{$a_start}<img src='{$src}' alt='{$alt}'{$title}/>{$a_end}
<figcaption markdown=1>{$caption}</figcaption>
</figure>
EOD;

        return $html;
    }



    /**
     * Shortcode for adding BASEURL to links.
     *
     * Usage example: [BASEURL]
     *
     * @return array with all the options.
     */
    protected function shortCodeBaseurl()
    {
        return $this->di->url->create() . "/";
    }



    /**
     * Shortcode for adding RELURL to links.
     *
     * Usage example: [RELURL]
     *
     * @return array with all the options.
     */
    protected function shortCodeRelurl()
    {
        return $this->di->url->createRelative() . "/";
    }


    /**
    * Shortcode for adding RELURL to links.
    *
    * Usage example: [RELURL]
    *
    * @return array with all the options.
    */
    protected function shortCodeAsset()
    {
        return $this->di->url->asset() . "/";
    }
}
";s:19:"*namespaceAliases";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:11:"*includes";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:12:"*constants";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:12:"*functions";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:10:"*classes";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{s:25:"\Anax\Content\CTextFilter";O:40:"phpDocumentor\Descriptor\ClassDescriptor":19:{s:9:"*parent";s:0:"";s:13:"*implements";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:11:"*abstract";b:0;s:8:"*final";b:0;s:12:"*constants";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:13:"*properties";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:10:"*methods";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:11:{s:8:"doFilter";O:41:"phpDocumentor\Descriptor\MethodDescriptor":17:{s:9:"*parent";r:15;s:11:"*abstract";b:0;s:8:"*final";b:0;s:9:"*static";b:0;s:13:"*visibility";s:6:"public";s:12:"*arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:2:{s:5:"$text";O:43:"phpDocumentor\Descriptor\ArgumentDescriptor":15:{s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:46:"phpDocumentor\Descriptor\Type\StringDescriptor":0:{}}}s:10:"*default";N;s:14:"*byReference";b:0;s:13:"*isVariadic";b:0;s:8:"*fqsen";s:0:"";s:7:"*name";s:5:"$text";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:0:"";s:14:"*description";s:19:"the text to filter.";s:17:"*fileDescriptor";N;s:7:"*line";i:0;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}s:8:"$filters";O:43:"phpDocumentor\Descriptor\ArgumentDescriptor":15:{s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:46:"phpDocumentor\Descriptor\Type\StringDescriptor":0:{}}}s:10:"*default";N;s:14:"*byReference";b:0;s:13:"*isVariadic";b:0;s:8:"*fqsen";s:0:"";s:7:"*name";s:8:"$filters";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:0:"";s:14:"*description";s:34:"as comma separated list of filter.";s:17:"*fileDescriptor";N;s:7:"*line";i:0;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}}}s:8:"*fqsen";s:37:"\Anax\Content\CTextFilter::doFilter()";s:7:"*name";s:8:"doFilter";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:17:"Call each filter.";s:14:"*description";s:0:"";s:17:"*fileDescriptor";N;s:7:"*line";i:24;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:2:{s:5:"param";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:2:{i:0;O:44:"phpDocumentor\Descriptor\Tag\ParamDescriptor":5:{s:15:"*variableName";s:5:"$text";s:8:"*types";r:36;s:7:"*name";s:5:"param";s:14:"*description";s:19:"the text to filter.";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}i:1;O:44:"phpDocumentor\Descriptor\Tag\ParamDescriptor":5:{s:15:"*variableName";s:8:"$filters";s:8:"*types";r:56;s:7:"*name";s:5:"param";s:14:"*description";s:34:"as comma separated list of filter.";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:6:"return";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\ReturnDescriptor":4:{s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:46:"phpDocumentor\Descriptor\Type\StringDescriptor":0:{}}}s:7:"*name";s:6:"return";s:14:"*description";s:19:"the formatted text.";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}s:11:"bbcode2html";O:41:"phpDocumentor\Descriptor\MethodDescriptor":17:{s:9:"*parent";r:15;s:11:"*abstract";b:0;s:8:"*final";b:0;s:9:"*static";b:0;s:13:"*visibility";s:6:"public";s:12:"*arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{s:5:"$text";O:43:"phpDocumentor\Descriptor\ArgumentDescriptor":15:{s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:46:"phpDocumentor\Descriptor\Type\StringDescriptor":0:{}}}s:10:"*default";N;s:14:"*byReference";b:0;s:13:"*isVariadic";b:0;s:8:"*fqsen";s:0:"";s:7:"*name";s:5:"$text";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:0:"";s:14:"*description";s:25:"The text to be converted.";s:17:"*fileDescriptor";N;s:7:"*line";i:0;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}}}s:8:"*fqsen";s:40:"\Anax\Content\CTextFilter::bbcode2html()";s:7:"*name";s:11:"bbcode2html";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:45:"Helper, BBCode formatting converting to HTML.";s:14:"*description";s:0:"";s:17:"*fileDescriptor";N;s:7:"*line";i:62;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:3:{s:5:"param";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:44:"phpDocumentor\Descriptor\Tag\ParamDescriptor":5:{s:15:"*variableName";s:5:"$text";s:8:"*types";r:123;s:7:"*name";s:5:"param";s:14:"*description";s:25:"The text to be converted.";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:6:"return";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\ReturnDescriptor":4:{s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:46:"phpDocumentor\Descriptor\Type\StringDescriptor":0:{}}}s:7:"*name";s:6:"return";s:14:"*description";s:19:"the formatted text.";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:4:"link";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:43:"phpDocumentor\Descriptor\Tag\LinkDescriptor":4:{s:7:"*link";s:72:"http://dbwebb.se/coachen/reguljara-uttryck-i-php-ger-bbcode-formattering";s:7:"*name";s:4:"link";s:14:"*description";s:72:"http://dbwebb.se/coachen/reguljara-uttryck-i-php-ger-bbcode-formattering";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}s:13:"makeClickable";O:41:"phpDocumentor\Descriptor\MethodDescriptor":17:{s:9:"*parent";r:15;s:11:"*abstract";b:0;s:8:"*final";b:0;s:9:"*static";b:0;s:13:"*visibility";s:6:"public";s:12:"*arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{s:5:"$text";O:43:"phpDocumentor\Descriptor\ArgumentDescriptor":15:{s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:46:"phpDocumentor\Descriptor\Type\StringDescriptor":0:{}}}s:10:"*default";N;s:14:"*byReference";b:0;s:13:"*isVariadic";b:0;s:8:"*fqsen";s:0:"";s:7:"*name";s:5:"$text";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:0:"";s:14:"*description";s:34:"the text that should be formatted.";s:17:"*fileDescriptor";N;s:7:"*line";i:0;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}}}s:8:"*fqsen";s:42:"\Anax\Content\CTextFilter::makeClickable()";s:7:"*name";s:13:"makeClickable";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:39:"Make clickable links from URLs in text.";s:14:"*description";s:0:"";s:17:"*fileDescriptor";N;s:7:"*line";i:96;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:3:{s:5:"param";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:44:"phpDocumentor\Descriptor\Tag\ParamDescriptor":5:{s:15:"*variableName";s:5:"$text";s:8:"*types";r:191;s:7:"*name";s:5:"param";s:14:"*description";s:34:"the text that should be formatted.";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:6:"return";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\ReturnDescriptor":4:{s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:46:"phpDocumentor\Descriptor\Type\StringDescriptor":0:{}}}s:7:"*name";s:6:"return";s:14:"*description";s:23:"with formatted anchors.";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:4:"link";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:43:"phpDocumentor\Descriptor\Tag\LinkDescriptor":4:{s:7:"*link";s:91:"http://dbwebb.se/coachen/lat-php-funktion-make-clickable-automatiskt-skapa-klickbara-lankar";s:7:"*name";s:4:"link";s:14:"*description";s:91:"http://dbwebb.se/coachen/lat-php-funktion-make-clickable-automatiskt-skapa-klickbara-lankar";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}s:8:"markdown";O:41:"phpDocumentor\Descriptor\MethodDescriptor":17:{s:9:"*parent";r:15;s:11:"*abstract";b:0;s:8:"*final";b:0;s:9:"*static";b:0;s:13:"*visibility";s:6:"public";s:12:"*arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{s:5:"$text";O:43:"phpDocumentor\Descriptor\ArgumentDescriptor":15:{s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:46:"phpDocumentor\Descriptor\Type\StringDescriptor":0:{}}}s:10:"*default";N;s:14:"*byReference";b:0;s:13:"*isVariadic";b:0;s:8:"*fqsen";s:0:"";s:7:"*name";s:5:"$text";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:0:"";s:14:"*description";s:34:"the text that should be formatted.";s:17:"*fileDescriptor";N;s:7:"*line";i:0;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}}}s:8:"*fqsen";s:37:"\Anax\Content\CTextFilter::markdown()";s:7:"*name";s:8:"markdown";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:41:"Format text according to Markdown syntax.";s:14:"*description";s:0:"";s:17:"*fileDescriptor";N;s:7:"*line";i:118;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:3:{s:5:"param";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:44:"phpDocumentor\Descriptor\Tag\ParamDescriptor":5:{s:15:"*variableName";s:5:"$text";s:8:"*types";r:259;s:7:"*name";s:5:"param";s:14:"*description";s:34:"the text that should be formatted.";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:6:"return";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\ReturnDescriptor":4:{s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:46:"phpDocumentor\Descriptor\Type\StringDescriptor":0:{}}}s:7:"*name";s:6:"return";s:14:"*description";s:27:"as the formatted html-text.";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:4:"link";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:43:"phpDocumentor\Descriptor\Tag\LinkDescriptor":4:{s:7:"*link";s:87:"http://dbwebb.se/coachen/skriv-for-webben-med-markdown-och-formattera-till-html-med-php";s:7:"*name";s:4:"link";s:14:"*description";s:87:"http://dbwebb.se/coachen/skriv-for-webben-med-markdown-och-formattera-till-html-med-php";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}s:5:"nl2br";O:41:"phpDocumentor\Descriptor\MethodDescriptor":17:{s:9:"*parent";r:15;s:11:"*abstract";b:0;s:8:"*final";b:0;s:9:"*static";b:0;s:13:"*visibility";s:6:"public";s:12:"*arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{s:5:"$text";O:43:"phpDocumentor\Descriptor\ArgumentDescriptor":15:{s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:46:"phpDocumentor\Descriptor\Type\StringDescriptor":0:{}}}s:10:"*default";N;s:14:"*byReference";b:0;s:13:"*isVariadic";b:0;s:8:"*fqsen";s:0:"";s:7:"*name";s:5:"$text";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:0:"";s:14:"*description";s:21:"text to be converted.";s:17:"*fileDescriptor";N;s:7:"*line";i:0;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}}}s:8:"*fqsen";s:34:"\Anax\Content\CTextFilter::nl2br()";s:7:"*name";s:5:"nl2br";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:31:"For convenience access to nl2br";s:14:"*description";s:0:"";s:17:"*fileDescriptor";N;s:7:"*line";i:132;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:2:{s:5:"param";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:44:"phpDocumentor\Descriptor\Tag\ParamDescriptor":5:{s:15:"*variableName";s:5:"$text";s:8:"*types";r:327;s:7:"*name";s:5:"param";s:14:"*description";s:21:"text to be converted.";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:6:"return";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\ReturnDescriptor":4:{s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:46:"phpDocumentor\Descriptor\Type\StringDescriptor":0:{}}}s:7:"*name";s:6:"return";s:14:"*description";s:19:"the formatted text.";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}s:9:"shortCode";O:41:"phpDocumentor\Descriptor\MethodDescriptor":17:{s:9:"*parent";r:15;s:11:"*abstract";b:0;s:8:"*final";b:0;s:9:"*static";b:0;s:13:"*visibility";s:6:"public";s:12:"*arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{s:5:"$text";O:43:"phpDocumentor\Descriptor\ArgumentDescriptor":15:{s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:46:"phpDocumentor\Descriptor\Type\StringDescriptor":0:{}}}s:10:"*default";N;s:14:"*byReference";b:0;s:13:"*isVariadic";b:0;s:8:"*fqsen";s:0:"";s:7:"*name";s:5:"$text";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:0:"";s:14:"*description";s:21:"text to be converted.";s:17:"*fileDescriptor";N;s:7:"*line";i:0;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}}}s:8:"*fqsen";s:38:"\Anax\Content\CTextFilter::shortCode()";s:7:"*name";s:9:"shortCode";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:44:"Shortcode to to quicker format text as HTML.";s:14:"*description";s:0:"";s:17:"*fileDescriptor";N;s:7:"*line";i:146;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:2:{s:5:"param";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:44:"phpDocumentor\Descriptor\Tag\ParamDescriptor":5:{s:15:"*variableName";s:5:"$text";s:8:"*types";r:387;s:7:"*name";s:5:"param";s:14:"*description";s:21:"text to be converted.";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:6:"return";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\ReturnDescriptor":4:{s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:46:"phpDocumentor\Descriptor\Type\StringDescriptor":0:{}}}s:7:"*name";s:6:"return";s:14:"*description";s:19:"the formatted text.";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}s:13:"shortCodeInit";O:41:"phpDocumentor\Descriptor\MethodDescriptor":17:{s:9:"*parent";r:15;s:11:"*abstract";b:0;s:8:"*final";b:0;s:9:"*static";b:1;s:13:"*visibility";s:9:"protected";s:12:"*arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{s:8:"$options";O:43:"phpDocumentor\Descriptor\ArgumentDescriptor":15:{s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:46:"phpDocumentor\Descriptor\Type\StringDescriptor":0:{}}}s:10:"*default";N;s:14:"*byReference";b:0;s:13:"*isVariadic";b:0;s:8:"*fqsen";s:0:"";s:7:"*name";s:8:"$options";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:0:"";s:14:"*description";s:18:"for the shortcode.";s:17:"*fileDescriptor";N;s:7:"*line";i:0;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}}}s:8:"*fqsen";s:42:"\Anax\Content\CTextFilter::shortCodeInit()";s:7:"*name";s:13:"shortCodeInit";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:92:"Init shortcode handling by preparing the option list to an array, for those using arguments.";s:14:"*description";s:0:"";s:17:"*fileDescriptor";N;s:7:"*line";i:193;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:2:{s:5:"param";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:44:"phpDocumentor\Descriptor\Tag\ParamDescriptor":5:{s:15:"*variableName";s:8:"$options";s:8:"*types";r:447;s:7:"*name";s:5:"param";s:14:"*description";s:18:"for the shortcode.";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:6:"return";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\ReturnDescriptor":4:{s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:51:"phpDocumentor\Descriptor\Type\UnknownTypeDescriptor":1:{s:7:"*name";s:5:"array";}}}s:7:"*name";s:6:"return";s:14:"*description";s:21:"with all the options.";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}s:15:"shortCodeFigure";O:41:"phpDocumentor\Descriptor\MethodDescriptor":17:{s:9:"*parent";r:15;s:11:"*abstract";b:0;s:8:"*final";b:0;s:9:"*static";b:1;s:13:"*visibility";s:9:"protected";s:12:"*arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{s:8:"$options";O:43:"phpDocumentor\Descriptor\ArgumentDescriptor":15:{s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:46:"phpDocumentor\Descriptor\Type\StringDescriptor":0:{}}}s:10:"*default";N;s:14:"*byReference";b:0;s:13:"*isVariadic";b:0;s:8:"*fqsen";s:0:"";s:7:"*name";s:8:"$options";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:0:"";s:14:"*description";s:18:"for the shortcode.";s:17:"*fileDescriptor";N;s:7:"*line";i:0;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}}}s:8:"*fqsen";s:44:"\Anax\Content\CTextFilter::shortCodeFigure()";s:7:"*name";s:15:"shortCodeFigure";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:23:"Shortcode for <figure>.";s:14:"*description";s:93:"Usage example: [FIGURE src="img/home/me.jpg" caption="Me" alt="Bild på mig" nolink="nolink"]";s:17:"*fileDescriptor";N;s:7:"*line";i:223;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:2:{s:5:"param";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:44:"phpDocumentor\Descriptor\Tag\ParamDescriptor":5:{s:15:"*variableName";s:8:"$options";s:8:"*types";r:508;s:7:"*name";s:5:"param";s:14:"*description";s:18:"for the shortcode.";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:6:"return";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\ReturnDescriptor":4:{s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:51:"phpDocumentor\Descriptor\Type\UnknownTypeDescriptor":1:{s:7:"*name";s:5:"array";}}}s:7:"*name";s:6:"return";s:14:"*description";s:21:"with all the options.";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}s:16:"shortCodeBaseurl";O:41:"phpDocumentor\Descriptor\MethodDescriptor":17:{s:9:"*parent";r:15;s:11:"*abstract";b:0;s:8:"*final";b:0;s:9:"*static";b:0;s:13:"*visibility";s:9:"protected";s:12:"*arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:8:"*fqsen";s:45:"\Anax\Content\CTextFilter::shortCodeBaseurl()";s:7:"*name";s:16:"shortCodeBaseurl";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:38:"Shortcode for adding BASEURL to links.";s:14:"*description";s:24:"Usage example: [BASEURL]";s:17:"*fileDescriptor";N;s:7:"*line";i:281;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:2:{s:6:"return";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\ReturnDescriptor":4:{s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:51:"phpDocumentor\Descriptor\Type\UnknownTypeDescriptor":1:{s:7:"*name";s:5:"array";}}}s:7:"*name";s:6:"return";s:14:"*description";s:21:"with all the options.";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:5:"param";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}s:15:"shortCodeRelurl";O:41:"phpDocumentor\Descriptor\MethodDescriptor":17:{s:9:"*parent";r:15;s:11:"*abstract";b:0;s:8:"*final";b:0;s:9:"*static";b:0;s:13:"*visibility";s:9:"protected";s:12:"*arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:8:"*fqsen";s:44:"\Anax\Content\CTextFilter::shortCodeRelurl()";s:7:"*name";s:15:"shortCodeRelurl";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:37:"Shortcode for adding RELURL to links.";s:14:"*description";s:23:"Usage example: [RELURL]";s:17:"*fileDescriptor";N;s:7:"*line";i:295;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:2:{s:6:"return";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\ReturnDescriptor":4:{s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:51:"phpDocumentor\Descriptor\Type\UnknownTypeDescriptor":1:{s:7:"*name";s:5:"array";}}}s:7:"*name";s:6:"return";s:14:"*description";s:21:"with all the options.";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:5:"param";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}s:14:"shortCodeAsset";O:41:"phpDocumentor\Descriptor\MethodDescriptor":17:{s:9:"*parent";r:15;s:11:"*abstract";b:0;s:8:"*final";b:0;s:9:"*static";b:0;s:13:"*visibility";s:9:"protected";s:12:"*arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:8:"*fqsen";s:43:"\Anax\Content\CTextFilter::shortCodeAsset()";s:7:"*name";s:14:"shortCodeAsset";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:37:"Shortcode for adding RELURL to links.";s:14:"*description";s:23:"Usage example: [RELURL]";s:17:"*fileDescriptor";N;s:7:"*line";i:308;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:2:{s:6:"return";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\ReturnDescriptor":4:{s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:51:"phpDocumentor\Descriptor\Type\UnknownTypeDescriptor":1:{s:7:"*name";s:5:"array";}}}s:7:"*name";s:6:"return";s:14:"*description";s:21:"with all the options.";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:5:"param";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}}}s:13:"*usedTraits";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:2:{i:0;s:16:"\Anax\TConfigure";i:1;s:24:"\Anax\DI\TInjectionAware";}}s:8:"*fqsen";s:25:"\Anax\Content\CTextFilter";s:7:"*name";s:11:"CTextFilter";s:12:"*namespace";s:13:"\Anax\Content";s:10:"*package";s:0:"";s:10:"*summary";s:26:"Filter and format content.";s:14:"*description";s:0:"";s:17:"*fileDescriptor";r:1;s:7:"*line";i:9;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:2:{s:7:"package";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:38:"phpDocumentor\Descriptor\TagDescriptor":3:{s:7:"*name";s:7:"package";s:14:"*description";s:7:"Default";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:10:"subpackage";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}}}s:13:"*interfaces";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:9:"*traits";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:10:"*markers";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:7:{i:0;a:3:{s:4:"type";s:0:"";s:7:"message";s:54:"Define all valid filters with their callback function.";s:4:"line";i:26;}i:1;a:3:{s:4:"type";s:0:"";s:7:"message";s:52:"Make an array of the comma separated string $filters";s:4:"line";i:35;}i:2;a:3:{s:4:"type";s:0:"";s:7:"message";s:63:"For each filter, call its function with the $text as parameter.";s:4:"line";i:38;}i:3;a:3:{s:4:"type";s:0:"";s:7:"message";s:65:"dbwebb.se/coachen/reguljara-uttryck-i-php-ger-bbcode-formattering";s:4:"line";i:60;}i:4;a:3:{s:4:"type";s:0:"";s:7:"message";s:84:"dbwebb.se/coachen/lat-php-funktion-make-clickable-automatiskt-skapa-klickbara-lankar";s:4:"line";i:94;}i:5;a:3:{s:4:"type";s:0:"";s:7:"message";s:47:"[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/))#',";s:4:"line";i:99;}i:6;a:3:{s:4:"type";s:0:"";s:7:"message";s:80:"dbwebb.se/coachen/skriv-for-webben-med-markdown-och-formattera-till-html-med-php";s:4:"line";i:116;}}}s:8:"*fqsen";s:0:"";s:7:"*name";s:15:"CTextFilter.php";s:12:"*namespace";N;s:10:"*package";s:7:"Default";s:10:"*summary";s:0:"";s:14:"*description";s:0:"";s:17:"*fileDescriptor";N;s:7:"*line";i:0;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:2:{s:7:"package";r:676;s:10:"subpackage";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:40:"phpDocumentor\Descriptor\Validator\Error":4:{s:11:"*severity";s:5:"error";s:7:"*code";s:13:"PPC:ERR-50000";s:7:"*line";i:0;s:10:"*context";a:2:{s:11:"{{ value }}";s:2:"""";i:0;s:0:"";}}}}s:19:"*inheritedElement";N;}