thunderer/Shortcode

View on GitHub
src/Handler/RawHandler.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php
namespace Thunder\Shortcode\Handler;

use Thunder\Shortcode\Shortcode\ProcessedShortcode;

/**
 * @author Tomasz Kowalczyk <tomasz@kowalczyk.cc>
 */
final class RawHandler
{
    public function __construct()
    {
    }

    /**
     * [raw]any content [with] or [without /] shortcodes[/raw]
     *
     * @param ProcessedShortcode $shortcode
     *
     * @return string
     */
    public function __invoke(ProcessedShortcode $shortcode)
    {
        return $shortcode->getTextContent();
    }
}