GetNewTagContent() public method

public GetNewTagContent ( $p_optArray )
    /**
     * @param array $p_optArray
     */
    private function getNewTagContent($p_optArray, $p_oldTagContent = null)
    {
        if (!is_array($p_optArray) || sizeof($p_optArray) < 1) {
            return;
        }

        $newTag = '';
        $p_optArray[0] = strtolower($p_optArray[0]);

        if ($p_optArray[0] == 'list'|| $p_optArray[0] == 'foremptylist'
                || strpos($p_optArray[0], 'endlist') !== false) {
            $newTag = TemplateConverterListObject::GetNewTagContent($p_optArray);
        } elseif ($p_optArray[0] == 'if' || $p_optArray[0] == 'endif') {
            $newTag = TemplateConverterIfBlock::GetNewTagContent($p_optArray);
        } else {
            if (in_array($p_optArray[0], array('uri','uripath','url','urlparameters'))) {
                $newTag = TemplateConverterHelper::GetNewTagContent($p_optArray);
            } else {
                return TemplateConverterHelper::GetNewTagContent($p_optArray, $this->m_templateDirectory);
            }
        }

        if (strlen($newTag) > 0) {
            $pattern = '/<!\*\*\s*'.@preg_quote($p_oldTagContent).'\s*>/';
            $replacement = CS_OPEN_TAG.' '.$newTag.' '.CS_CLOSE_TAG;
            $this->m_templateOriginalContent = @preg_replace($pattern,
                                                             $replacement,
                                                             $this->m_templateOriginalContent,
                                                             1);
            return null;
        }

        return false;
    } // fn getNewTagContent