/** * 返回格式化以后的 body 文本 * * @return string */ function getFormattedBody() { if (!function_exists('bbencode_all')) { require ExampleBlogApp::instance()->ROOT_DIR() . '/vendor/bbcode.php'; } return bbencode_all($this->body); }
/** * 使用 BBCode 格式化文本 * * @param string $body * * @return string */ function _formatText($body) { require_once APP_DIR . '/Helper/bbcode.php'; return bbencode_all($body, 'post'); }