{param}'); array_push($this->definitions, $builder->build()); /* [i] italics tag */ $builder = new CodeDefinitionBuilder('i', '{param}'); array_push($this->definitions, $builder->build()); /* [u] underline tag */ $builder = new CodeDefinitionBuilder('u', '{param}'); array_push($this->definitions, $builder->build()); /* [s] underline tag */ $builder = new CodeDefinitionBuilder('s', '{param}'); array_push($this->definitions, $builder->build()); /* [h] underline tag */ $builder = new CodeDefinitionBuilder('h', '{param}'); array_push($this->definitions, $builder->build()); /* [sup] underline tag */ $builder = new CodeDefinitionBuilder('sup', '{param}'); array_push($this->definitions, $builder->build()); /* [sub] underline tag */ $builder = new CodeDefinitionBuilder('sub', '{param}'); array_push($this->definitions, $builder->build()); /* [code] underline tag */ $builder = new CodeDefinitionBuilder('code', '{param}'); array_push($this->definitions, $builder->build()); /* [hr] underline tag */ $builder = new CodeDefinitionBuilder('hr', "
{param}"); array_push($this->definitions, $builder->build()); /* [left] center tag */ $builder = new CodeDefinitionBuilder('left', '
{param}
'); array_push($this->definitions, $builder->build()); /* [center] center tag */ $builder = new CodeDefinitionBuilder('center', '
{param}
'); array_push($this->definitions, $builder->build()); /* [right] center tag */ $builder = new CodeDefinitionBuilder('right', '
{param}
'); array_push($this->definitions, $builder->build()); /* [justify] center tag */ $builder = new CodeDefinitionBuilder('justify', '
{param}
'); array_push($this->definitions, $builder->build()); /* [list] list tag */ $builder = new CodeDefinitionBuilder('list', ''); array_push($this->definitions, $builder->build()); /* [ul] list tag */ $builder = new CodeDefinitionBuilder('ul', ''); array_push($this->definitions, $builder->build()); /* [ol] list tag */ $builder = new CodeDefinitionBuilder('ol', '
    {param}
'); array_push($this->definitions, $builder->build()); /* [*] item tag */ $builder = new CodeDefinitionBuilder('*', '
  • {param}
  • '); array_push($this->definitions, $builder->build()); /* [li] item tag */ $builder = new CodeDefinitionBuilder('li', '
  • {param}
  • '); array_push($this->definitions, $builder->build()); /* [h1] item tag */ $builder = new CodeDefinitionBuilder('h1', '

    {param}

    '); array_push($this->definitions, $builder->build()); /* [h2] item tag */ $builder = new CodeDefinitionBuilder('h2', '

    {param}

    '); array_push($this->definitions, $builder->build()); /* [h3] item tag */ $builder = new CodeDefinitionBuilder('h3', '

    {param}

    '); array_push($this->definitions, $builder->build()); /* [h4] item tag */ $builder = new CodeDefinitionBuilder('h4', '

    {param}

    '); array_push($this->definitions, $builder->build()); /* [spoiler] spoiler tag */ $builder = new CodeDefinitionBuilder("spoiler", ""); array_push($this->definitions, $builder->build()); /* [quote] quote tag */ $builder = new CodeDefinitionBuilder("quote", "
    {param}
    "); array_push($this->definitions, $builder->build()); $urlValidator = new \JBBCode\validators\UrlValidator(); /* [url] link tag */ $builder = new CodeDefinitionBuilder('url', '{param}'); $builder->setParseContent(false)->setBodyValidator($urlValidator); array_push($this->definitions, $builder->build()); /* [url=http://example.com] link tag */ $builder = new CodeDefinitionBuilder('url', '{param}'); $builder->setUseOption(true)->setParseContent(true)->setOptionValidator($urlValidator); array_push($this->definitions, $builder->build()); /* [img] image tag */ $builder = new CodeDefinitionBuilder('img', ''); $builder->setUseOption(false)->setParseContent(false)->setBodyValidator($urlValidator); array_push($this->definitions, $builder->build()); /* [img=alt text] image tag */ $builder = new CodeDefinitionBuilder('img', '{option}'); $builder->setUseOption(true)->setParseContent(false)->setBodyValidator($urlValidator); array_push($this->definitions, $builder->build()); /* [color] color tag */ //$builder = new CodeDefinitionBuilder('color', '{param}'); //$builder->setUseOption(true)->setOptionValidator(new \JBBCode\validators\CssColorValidator()); //array_push($this->definitions, $builder->build()); } /** * Returns an array of the default code definitions. */ public function getCodeDefinitions() { return $this->definitions; } }