private static function CheckConditions(){
            $oThis = self::CreateInstanceIfNotExists();
            $oThis->sBuffer = str_replace("{else}", "<?php } else { ?>", $oThis->sBuffer);
            $oThis->sBuffer = str_replace("{endif}", "<?php } ?>", $oThis->sBuffer);
            $oThis->sBuffer = str_replace(array('{if }', '{if  }'), "<?php if(false){ ?>", $oThis->sBuffer);

            //IF
            $Offset = 0;

            while(preg_match('/{if\s*(.*?)}/i', $oThis->sBuffer, $aMatches, PREG_OFFSET_CAPTURE, $Offset)){
                $oThis->sBuffer = str_replace($aMatches[0][0], "<?php if(".$aMatches[1][0]."){ ?>", $oThis->sBuffer);
                $Offset = $aMatches[0][1]+strlen($aMatches[0][0]);
            }

            //Elseif
            $Offset = 0;

            while(preg_match('/{elseif\s*(.*?)}/i', $oThis->sBuffer, $aMatches, PREG_OFFSET_CAPTURE, $Offset)){
                $oThis->sBuffer = str_replace($aMatches[0][0], "<?php } elseif(".$aMatches[1][0]."){ ?>", $oThis->sBuffer);
                $Offset = $aMatches[0][1]+strlen($aMatches[0][0]);
            }
        }