1 | <?php |
||
21 | class InlineWrapper |
||
22 | { |
||
23 | |||
24 | protected $setup = false; |
||
25 | private $title = ''; |
||
26 | private $text = ''; |
||
27 | private $link = ''; |
||
28 | private $isMd = false; |
||
29 | private $isHtml = false; |
||
30 | private $isRaw = false; |
||
31 | private static $def = []; |
||
32 | |||
33 | public function __construct($text = '', $link = '', $title = '') |
||
43 | |||
44 | /** |
||
45 | * Setup defaults |
||
46 | * |
||
47 | * @see https://github.com/Maslosoft/Zamm/issues/4 |
||
48 | * @return static |
||
49 | */ |
||
50 | public static function defaults() |
||
56 | |||
57 | public function __get($name) |
||
61 | |||
62 | public function md($value = true) |
||
68 | |||
69 | public function html($value = true) |
||
75 | |||
76 | /** |
||
77 | * Strip leading $ from variables and trailing () from methods |
||
78 | * @return InlineWrapper |
||
79 | */ |
||
80 | public function raw($value = true) |
||
85 | |||
86 | public function __toString() |
||
106 | |||
107 | private function wrap($text) |
||
119 | |||
120 | private function setFlag($flag, $value = true) |
||
128 | |||
129 | } |
||
130 |