コード例 #1
0
ファイル: scanForPlugIns.php プロジェクト: juddy/GIP
</td>
<td><?php 
    echo LANG_BASIC_AUTHOR;
    ?>
</td>
<td><?php 
    echo LANG_BASIC_RUN;
    ?>
</td>
</tr>


<?php 
    for ($a = 0; $a < count($plugins); $a++) {
        $thisPlugIn = $plugins[$a];
        $fileString = fileSystemUtils::getStringFromFile($thisPlugIn);
        preg_match_all('/<DESCRIPTION>(.+)<\\/DESCRIPTION>/', $fileString, $descMatch);
        preg_match_all('/<PARAMETERS>(.+)<\\/PARAMETERS>/', $fileString, $parameterMatch);
        preg_match_all('/<AUTHOR>(.+)<\\/AUTHOR>/', $fileString, $authorMatch);
        preg_match_all('/<PLUGINNAME>(.+)<\\/PLUGINNAME>/', $fileString, $nameMatch);
        preg_match_all('/<LOADER>(.+)<\\/LOADER>/', $fileString, $loaderMatch);
        $description = $descMatch[1][0];
        $author = $authorMatch[1][0];
        $name = $nameMatch[1][0];
        $loader = isset($loaderMatch[1][0]) ? $loaderMatch[1][0] : "";
        $parameters = isset($parameterMatch[1][0]) ? $parameterMatch[1][0] : "";
        if ($author == "") {
            $author = LANG_BASIC_ANONYMOUS;
        }
        if ($description == "") {
            $description = LANG_BASIC_NOT_AVAILABLE;
コード例 #2
0
ファイル: stringUtils.class.php プロジェクト: juddy/GIP
 function replaceStringInFileAndSaveFile($fullFileName, $replacementPairs)
 {
     $fileString = fileSystemUtils::getStringFromFile($fullFileName);
     $newString = stringUtils::replaceAndGetNewString($fileString, $replacementPairs);
     return fileSystemUtils::saveStringInFile($fullFileName, $newString);
 }