-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathReplacedShortcode.php
More file actions
46 lines (40 loc) · 1.05 KB
/
Copy pathReplacedShortcode.php
File metadata and controls
46 lines (40 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
namespace Thunder\Shortcode\Shortcode;
/**
* @author Tomasz Kowalczyk <tomasz@kowalczyk.cc>
*/
final class ReplacedShortcode extends AbstractShortcode
{
/** @var string */
private $replacement;
/** @var string */
private $text;
/** @var int */
private $offset;
/** @param string $replacement */
public function __construct(ParsedShortcodeInterface $shortcode, $replacement)
{
$this->name = $shortcode->getName();
$this->parameters = $shortcode->getParameters();
$this->content = $shortcode->getContent();
$this->bbCode = $shortcode->getBbCode();
$this->text = $shortcode->getText();
$this->offset = $shortcode->getOffset();
$this->replacement = $replacement;
}
/** @return string */
public function getReplacement()
{
return $this->replacement;
}
/** @return string */
public function getText()
{
return $this->text;
}
/** @return int */
public function getOffset()
{
return $this->offset;
}
}