1 | <?php |
||
28 | class SlackMarkdown |
||
29 | { |
||
30 | const LIST_MARKER = 'marker'; |
||
31 | const LIST_NUMERIC = 'numeric'; |
||
32 | |||
33 | /** |
||
34 | * @param int $linesNumber Minimum 1, maximum 5 |
||
35 | * |
||
36 | * @return string |
||
37 | */ |
||
38 | public static function newLine(int $linesNumber = 1): string |
||
55 | |||
56 | /** |
||
57 | * @param string $string |
||
58 | * |
||
59 | * @return string |
||
60 | */ |
||
61 | public static function bold(string $string): string |
||
65 | |||
66 | /** |
||
67 | * @param string $string |
||
68 | * |
||
69 | * @return string |
||
70 | */ |
||
71 | public static function italic(string $string): string |
||
75 | |||
76 | /** |
||
77 | * @param string $string |
||
78 | * |
||
79 | * @return string |
||
80 | */ |
||
81 | public static function strike(string $string): string |
||
85 | |||
86 | /** |
||
87 | * @param string $title |
||
88 | * @param string $url |
||
89 | * |
||
90 | * @return string |
||
91 | */ |
||
92 | public static function link(string $title, string $url): string |
||
96 | |||
97 | /** |
||
98 | * @param array $lines |
||
99 | * |
||
100 | * @return string |
||
101 | */ |
||
102 | public static function multilines(array $lines): string |
||
106 | |||
107 | /** |
||
108 | * @param array $list |
||
109 | * @param string $listType |
||
110 | * |
||
111 | * @return string |
||
112 | * |
||
113 | * @throws SlackbotException |
||
114 | */ |
||
115 | public static function list(array $list, string $listType = self::LIST_MARKER): string |
||
144 | |||
145 | /** |
||
146 | * @param string $string |
||
147 | * |
||
148 | * @return string |
||
149 | */ |
||
150 | public static function inlineCode(string $string): string |
||
154 | |||
155 | /** |
||
156 | * @param array $lines |
||
157 | * |
||
158 | * @return string |
||
159 | */ |
||
160 | public static function code(array $lines): string |
||
168 | } |
||
169 |