public function __construct(ShortcodeInterface $shortcode, $text, $offset)
 {
     $this->name = $shortcode->getName();
     $this->parameters = $shortcode->getParameters();
     $this->content = $shortcode->getContent();
     $this->bbCode = $shortcode->getBbCode();
     $this->text = $text;
     $this->offset = $offset;
 }
Exemplo n.º 2
0
 public function __construct(ShortcodeInterface $shortcode, $text, $offset, array $offsets = array())
 {
     $this->name = $shortcode->getName();
     $this->parameters = $shortcode->getParameters();
     $this->content = $shortcode->getContent();
     $this->text = $text;
     $this->offset = $offset;
     if (array_diff_key($offsets, $this->offsets)) {
         throw new \InvalidArgumentException('Invalid positions data!');
     }
     $this->offsets = array_merge($this->offsets, $offsets);
 }
 public function addShortcode(ShortcodeInterface $shortcode)
 {
     $this->shortcodes[$shortcode->getName()] = $shortcode;
 }