19 declare(strict_types=1);
33 $p = strpos($html, self::PH_START . $tag, $offset);
34 return is_int($p) ? $p :
null;
39 $p = strpos($html, self::PH_END, $offset);
40 return is_int($p) ? ($p + strlen(self::PH_END)) :
null;
48 $tag_string = substr($html, $start + strlen(self::PH_START), $end - $start - strlen(self::PH_START) - strlen(self::PH_END));
57 if (is_string($tag_string)) {
58 return explode(
";", $tag_string);
70 if (is_int($start1)) {
73 $end_tag_with_params = str_replace($start_tag .
";", $end_tag .
";", $param_str);
75 if (is_int($end1) && is_int($start2)) {
78 return substr($html, $end1, $start2 - $end1);
93 if (is_int($start1)) {
96 $end_tag_with_params = str_replace($start_tag .
";", $end_tag .
";", $param_str);
98 if (is_int($end1) && is_int($start2)) {
101 return substr($html, 0, $start1) .
103 substr($html, $end2);
replaceInnerContentAndPlaceholders(string $html, string $start_tag, string $end_tag, string $replacement)
parameters of start and end tag must match {{{{{StartTag;a;b;c}}}}}...inner content...{{{{{EndTag;a;b;c}}}}} ...replacement...
getPlaceholderParams(string $html, string $tag)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getPlaceholderParamString(string $html, string $tag)
getPosOfPlaceholder(string $html, string $tag, int $offset=0)
getEndPosOfPlaceholder(string $html, int $offset=0)
getInnerContentOfPlaceholders(string $html, string $start_tag, string $end_tag)
parameters of start and end tag must match {{{{{StartTag;a;b;c}}}}}...inner content...{{{{{EndTag;a;b;c}}}}}