App\Libraries\BBCodeForDB::generate PHP Méthode

generate() public méthode

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

Exemple #1
0
 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