Subversion Repositories php-qbpwcf

Rev

Rev 218 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?php

/*

        QBPWCF, Quick Build PHP website Component base on Fedora Linux.
    Copyright (C) 2014~2025 MIN ZHI, CHEN

    This file is part of QBPWCF.

    QBPWCF is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    QBPWCF is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with QBPWCF.  If not, see <http://www.gnu.org/licenses/>.

*/

#使用命名空間qbpwcf
namespace qbpwcf;

#assets dir
$assetsDir="assets of search::findConMatchStrs_20251203";

#匯入定義的原始陣列字串 $replaceFromArray
include($assetsDir."/inputs.php");

#要用於檢查的原始資料
$inputs=$oriDataFromArray;

#匯入定義的連續關鍵字串 $replaceFromArray
include($assetsDir."/formats.php");

#連續的關鍵字串
$formats=$replaceFromArray;

#尋找連續的多行字串是否依順含有符合格式的內容,且回傳解析好的變數數值.
#回傳結果:
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
#$reuslt["error"],執行不正常結束的錯訊息陣列.
#$result["function"],當前執行的函式名稱.
#$result["argu"],所使用的參數.
#$result["found"],是否有找到符合格式的連續字串內容,"true"代表有找到,"false"代表沒有找到.
#$result["content"],陣列,每段符合格式的段落資訊.
#$result["content"][$i]["lineS"],字串,為第 $i+1 個符合格式的段落起始行數.
#$result["content"][$i]["ori"],陣列,為第 $i+1 個符合格式的段落每行原始內容.
#$result["content"][$i]["new"],陣列,為第 $i+1 個符合格式的段落每行置換後內容.
#$result["content"][$i]["vars"],陣列,為第 $i+1 個符合格式的段落每行變數解析的結果.
#必填參數:
#$conf["input"],字串陣列,要檢查的每行字串.
$conf["input"]=$inputs;
#$conf["format"],格式字串陣列,要尋找的每行格式字串集合.格式為固定的字串("fixedStr format")與變數("${keyWordVarName}")組成.
$conf["formats"]=$formats;
#可省略參數:
#無.
#參考資料:
#無.
#備註:
#無.
$findConMatchStrs=search::findConMatchStrs($conf);
unset($conf);

#debug
var_dump($findConMatchStrs);

?>