protected function getEdges($element)
    {
        // TODO: Performance tuning possible here by not looping

        foreach ($this->options["tags"] as $tag) {
            list($opening, $closing, $depth) = $tag;

            if (substr($element, 0, strlen($opening)) === $opening
                && substr($element, -1 * strlen($closing)) === $closing) {

                return $tag;
            }
        }
    }
protected function getEdges($element)
    {
        // TODO: Performance tuning possible here by not looping

        foreach ($this->options["tags"] as $tag) {
            list($opening, $closing, $depth) = $tag;

            if (substr($element, 0, strlen($opening)) === $opening
                && substr($element, -1 * strlen($closing)) === $closing) {

                return $tag;
            }
        }
    }
protected function getEdges ( $ element ) { // TODO: Performance tuning possible here by not looping foreach ( $ this -> options [ "tags" ] as $ tag ) { list ( $ opening , $ closing , $ depth ) = $ tag ; if ( substr ( $ element , 0 , strlen ( $ opening ) ) === $ opening && substr ( $ element , - 1 * strlen ( $ closing ) ) === $ closing ) { return $ tag ; } } }
Extract XML compatible tag head and tail
@param  string $element XML element
@return string[] 0 => Opening tag, 1 => Closing tag
Extract XML compatible tag head and tail