App\Libraries\BBCodeForDB::generate PHP Method

generate() public method

public generate ( )
    public function generate()
    {
        $text = htmlentities($this->text, ENT_QUOTES, 'UTF-8', true);
        $text = $this->parseCode($text);
        $text = $this->parseNotice($text);
        $text = $this->parseBox($text);
        $text = $this->parseQuote($text);
        $text = $this->parseList($text);
        $text = $this->parseBlockSimple($text);
        $text = $this->parseInlineSimple($text);
        $text = $this->parseAudio($text);
        $text = $this->parseEmail($text);
        $text = $this->parseUrl($text);
        $text = $this->parseSize($text);
        $text = $this->parseColour($text);
        $text = $this->parseYoutube($text);
        $text = $this->parseProfile($text);
        $text = $this->parseSmiley($text);
        $text = $this->parseLinks($text);
        return $text;
    }

Usage Example

コード例 #1
0
ファイル: Post.php プロジェクト: ppy/osu-web
 public function setPostTextAttribute($value)
 {
     $bbcode = new BBCodeForDB($value);
     $this->attributes['post_text'] = $bbcode->generate();
     $this->attributes['bbcode_uid'] = $bbcode->uid;
     $this->attributes['bbcode_bitfield'] = $bbcode->bitfield;
 }
All Usage Examples Of App\Libraries\BBCodeForDB::generate