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/libraries/Controllers/HelperController.php

34 lines
539 B
PHP
Raw Normal View History

2016-03-25 01:31:57 +00:00
<?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
{
2016-03-27 21:18:57 +00:00
/**
* Parsed BBcode from a post request
*
* @return string The parsed BBcode
*/
2016-03-25 01:31:57 +00:00
public function bbcodeParse()
{
2016-03-27 21:18:57 +00:00
$text = isset($_POST['text']) ? $_POST['text'] : '';
2016-03-25 01:31:57 +00:00
$text = BBcode::toHTML($text);
return $text;
}
}