protected function restoreHolders($content)
    {
        if (!empty($this->holder)) {

            /**
             * Now the question that you might be asking yourself is, why use a 'for' loop instead
             * of the plain 'str_replace' function once?
             *
             * Well, since html can be nested, there might be cases were a placeholder was placed inside
             * another placeholder and if we do just one 'str_replace', we might not get the full original
             * content.
             *
             * In order to ensure that no data is lost, we need to run 'str_replace' for each time a tag
             * was registered in the constructor. That is the worst case scenario, most of the times, the loop
             * is just going to run once and repeat the cycle only if there are signs that another placeholder is in
             * the content.
             */
            $count = count($this->tags) + 1;
            for ($i=0; $i < $count; $i++) {
                $content = str_replace(array_keys($this->holder), array_values($this->holder), $content);
                if (strpos($content, '%{{') === false) {
                    break;
                }
            }

        }

        return $content;
    }
protected function restoreHolders($content)
    {
        if (!empty($this->holder)) {

            /**
             * Now the question that you might be asking yourself is, why use a 'for' loop instead
             * of the plain 'str_replace' function once?
             *
             * Well, since html can be nested, there might be cases were a placeholder was placed inside
             * another placeholder and if we do just one 'str_replace', we might not get the full original
             * content.
             *
             * In order to ensure that no data is lost, we need to run 'str_replace' for each time a tag
             * was registered in the constructor. That is the worst case scenario, most of the times, the loop
             * is just going to run once and repeat the cycle only if there are signs that another placeholder is in
             * the content.
             */
            $count = count($this->tags) + 1;
            for ($i=0; $i < $count; $i++) {
                $content = str_replace(array_keys($this->holder), array_values($this->holder), $content);
                if (strpos($content, '%{{') === false) {
                    break;
                }
            }

        }

        return $content;
    }
protected function restoreHolders ( $ content ) { if ( ! empty ( $ this -> holder ) ) { /**
             * Now the question that you might be asking yourself is, why use a 'for' loop instead
             * of the plain 'str_replace' function once?
             *
             * Well, since html can be nested, there might be cases were a placeholder was placed inside
             * another placeholder and if we do just one 'str_replace', we might not get the full original
             * content.
             *
             * In order to ensure that no data is lost, we need to run 'str_replace' for each time a tag
             * was registered in the constructor. That is the worst case scenario, most of the times, the loop
             * is just going to run once and repeat the cycle only if there are signs that another placeholder is in
             * the content.
             */ $ count = count ( $ this -> tags ) + 1 ; for ( $ i = 0 ; $ i < $ count ; $ i ++ ) { $ content = str_replace ( array_keys ( $ this -> holder ) , array_values ( $ this -> holder ) , $ content ) ; if ( strpos ( $ content , '%{{' ) === false ) { break ; } } } return $ content ; }
Restores all the dummy placeholders with the original content

@param string $content
@return string
Restores all the dummy placeholders with the original content