public static function getTagRegex($tags, $include_no_attributes = true, $include_ending = true, $required_attributes = array()) { require_once __DIR__ . '/tags.php'; return NNTags::getRegexTags($tags, $include_no_attributes, $include_ending, $required_attributes); }
private function getDivTags($data) { list($tag_start, $tag_end) = $this->getTagCharacters(true); return NNTags::getDivTags($data['start_div'], $data['end_div'], $tag_start, $tag_end); }
static function setSurroundingTags($pre, $post, $tags = 0) { require_once __DIR__ . '/tags.php'; return NNTags::setSurroundingTags($pre, $post, $tags); }
function cleanTagsFromHead(&$string) { if (strpos($string, $this->src_params->tag_character_start . $this->src_params->syntax_word) === false && strpos($string, $this->src_params->tag_character_start . '/' . $this->src_params->syntax_word) === false) { return; } list($tag_start, $tag_end) = $this->getTagCharacters(true); $spaces = NNTags::getRegexSpaces('*'); $inside_tag = NNTags::getRegexInsideTag(); // Remove start tag to end tag $string = preg_replace($this->src_params->regex, '', $string); // Remove start tag with optional php stuff after it $string = preg_replace('#' . $tag_start . preg_quote($this->src_params->syntax_word, '#') . $spaces . '(' . $inside_tag . ')' . $tag_end . '(\\s*<\\?php(.*?)\\?>)?' . '#s', '', $string); // Remove left over end tags $string = preg_replace('#' . $tag_start . '\\/' . preg_quote($this->src_params->syntax_word, '#') . $tag_end . '#s', '', $string); }