private static function ReplaceVars(){
            $oThis = self::CreateInstanceIfNotExists();

            $aP = array();
            $iOffset = 0;

            while(preg_match('/(\{\$(.*?)\})/i', $oThis->sBuffer, $aMatches, PREG_OFFSET_CAPTURE, $iOffset)){
                $mVar = $aMatches[2][0];

                if(Storage::Has($mVar)){
                    $mTo = Storage::Get($mVar);

                    if(is_bool($mTo))
                        $mTo = ($mTo) ? "true" : "false";

                    $mTo = html_entity_decode($mTo, ENT_NOQUOTES/*, Config::Read("l10n.charset")*/);
                    $oThis->sBuffer = str_replace($aMatches[0][0], $mTo, $oThis->sBuffer);
                }

                $iOffset = $aMatches[0][1]+strlen($aMatches[0][0]);
            }
        }