This repository has been archived on 2024-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
sakura/app/Controllers/HelperController.php
2016-07-26 19:29:53 +02:00

33 lines
539 B
PHP

<?php
/**
* Holds helpers for JavaScript.
*
* @package Sakura
*/
namespace Sakura\Controllers;
use Sakura\BBcode;
/**
* Helper controller.
*
* @package Sakura
* @author Julian van de Groep <me@flash.moe>
*/
class HelperController extends Controller
{
/**
* Parsed BBcode from a post request
*
* @return string The parsed BBcode
*/
public function bbcodeParse()
{
$text = isset($_POST['text']) ? $_POST['text'] : '';
$text = BBcode::toHTML($text);
return $text;
}
}