Beispiel #1
0
 public static function parsePhpForPhraseTracking($path, $contents)
 {
     if (self::$_lookingForPhraseTitles == false) {
         return;
     }
     if (strpos($path, 'library/DevHelper/') === 0) {
         return;
     }
     $offset = 0;
     $newXenForoPhrase = 'new XenForo_Phrase(';
     while (true) {
         $strPos = strpos($contents, $newXenForoPhrase, $offset);
         if ($strPos !== false) {
             $offset = $strPos + strlen($newXenForoPhrase);
             $phraseTitle = DevHelper_Helper_Php::extractString($contents, $offset);
             if (is_string($phraseTitle)) {
                 self::$_foundPhraseTitles[$phraseTitle][$path] = substr_count(substr($contents, 0, $offset), "\n");
             } else {
                 continue;
             }
         } else {
             break;
         }
     }
 }