Blame | Last modification | View Log | RSS feed
<?php#指派命名空間namespace qbpwcf;#匯入外部套件include("../allInOne.php");/*#提示目前在測試的函式echo "<hr>phpLib::getLibFileList - testCase 1<p>";#函式說明:#取得函式庫目錄底下的檔案#必填的參數:$conf["folderAddress"]="../";#要讀取的函式庫目錄#$conf["fileArgu"],字串__FILE__的內容.$conf["fileArgu"]=__FILE__;#可省略的參數:$conf["readFileType"]=array("php","js","css");#要讀取具有該陣列底下副檔名的檔案var_dump(phpLib::getLibFileList($conf));*//*#提示目前在測試的函式echo "<hr>phpLib::getPhpLibConstruction - testCase 1<p>";#函式說明:#取得php函式庫檔案的內容#回傳的結果:#$result["status"],0表示取得成功;1表示取得失敗#$result["namesapceCount"],命名空間的筆數#$result["classCount"],類別的筆數#$result["founctionCount"],函式的筆數#$result["namespace"],命名空間陣列#$result["class"],類別的陣列#$result["function"],函式的陣列#必填的參數:$conf["libFileAddress"]="../phpLib.php";#要讀取的函式庫檔案位置#$conf["fileArgu"],字串,__FILE__的內容.$conf["fileArgu"]=__FILE__;$result["phpLib"]["getPhpLibConstruction"]=phpLib::getPhpLibConstruction($conf);unset($conf);#留存php檔案類別結構$phpFileConstruction=$result["phpLib"]["getPhpLibConstruction"];var_dump($result["phpLib"]["getPhpLibConstruction"]);*//*#提示目前在測試的函式echo "<hr>phpLib::getPhpLibConstruction - testCase 2<p>";#函式說明:#取得php函式庫檔案的內容#回傳的結果:#$result["status"],0表示取得成功;1表示取得失敗#$result["namesapceCount"],命名空間的筆數#$result["classCount"],類別的筆數#$result["founctionCount"],函式的筆數#$result["namespace"],命名空間陣列#$result["class"],類別的陣列#$result["function"],函式的陣列#必填的參數:$conf["libFileAddress"]="../amazon.php";#要讀取的函式庫檔案位置#$conf["fileArgu"],字串,__FILE__的內容.$conf["fileArgu"]=__FILE__;$result["phpLib"]["getPhpLibConstruction"]=phpLib::getPhpLibConstruction($conf);unset($conf);#留存php檔案類別結構$phpFileConstruction=$result["phpLib"]["getPhpLibConstruction"];var_dump($result["phpLib"]["getPhpLibConstruction"]);*//*#提示目前在測試的函式echo "<hr>phpLib::getPhpLibConstruction - testCase 3<p>";#函式說明:#取得php函式庫檔案的內容#回傳的結果:#$result["status"],0表示取得成功;1表示取得失敗#$result["namesapceCount"],命名空間的筆數#$result["classCount"],類別的筆數#$result["founctionCount"],函式的筆數#$result["namespace"],命名空間陣列#$result["class"],類別的陣列#$result["function"],函式的陣列#必填的參數:$conf["libFileAddress"]="../analyse.php";#要讀取的函式庫檔案位置#$conf["fileArgu"],字串,__FILE__的內容.$conf["fileArgu"]=__FILE__;$result["phpLib"]["getPhpLibConstruction"]=phpLib::getPhpLibConstruction($conf);unset($conf);#留存php檔案類別結構$phpFileConstruction=$result["phpLib"]["getPhpLibConstruction"];var_dump($result["phpLib"]["getPhpLibConstruction"]);*//*#提示目前在測試的函式echo "<hr>phpLib::getFunctionConstruction - testCase 1<p>";#函式說明:#取得函式的結構#回傳的結果:#$result["status"],執行是否成功"true"代表執行成功,"false"代表執行失敗#$result["error"],錯誤訊息陣列#$result["mustBeFilled"]["dataCount"],不可省略的參數陣列元素數量#$result["optionalFilled"]["dataCount"],可省略的參數陣列元素數量#$result["mustBeFilled"]["name"],不可省略的參數陣列#$result["mustBeFilled"]["comment"],不可省略的參數註解陣列#$result["optionalFilled"]["name"],可省略的參數陣列#$result["optionalFilled"]["comment"],可省略的參數註解陣列#$result["reference"]["addr"],參考資料的網址#$result["reference"]["comment"],參考資料的說明#必填的參數:$conf["phpFileAddress"]="../phpLib.php";#含有函式內容的php檔案位置與名稱#$conf["fileArgu"],字串,__FILE__的內容.$conf["fileArgu"]=__FILE__;$conf["functionName"]="getFunctionConstruction";#函式的名稱$getFunctionConstruction=phpLib::getFunctionConstruction($conf);unset($conf);var_dump($getFunctionConstruction);*//*#提示目前在測試的函式echo "<hr>phpLib::getFunctionConstruction - testCase 2<p>";#函式說明:#取得函式的結構#回傳的結果:#$result["status"],執行是否成功"true"代表執行成功,"false"代表執行失敗#$result["error"],錯誤訊息陣列#$result["mustBeFilled"]["dataCount"],不可省略的參數陣列元素數量#$result["optionalFilled"]["dataCount"],可省略的參數陣列元素數量#$result["mustBeFilled"]["name"],不可省略的參數陣列#$result["mustBeFilled"]["comment"],不可省略的參數註解陣列#$result["optionalFilled"]["name"],可省略的參數陣列#$result["optionalFilled"]["comment"],可省略的參數註解陣列#$result["reference"]["addr"],參考資料的網址#$result["reference"]["comment"],參考資料的說明#必填的參數:$conf["phpFileAddress"]="../phpLib.php";#含有函式內容的php檔案位置與名稱#$conf["fileArgu"],字串,__FILE__的內容.$conf["fileArgu"]=__FILE__;$conf["functionName"]="getLibFileList";#函式的名稱$getFunctionConstruction=phpLib::getFunctionConstruction($conf);unset($conf);var_dump($getFunctionConstruction);*//*#提示目前在測試的函式echo "<hr>phpLib::getFunctionConstruction - testCase 3<p>";#函式說明:#取得函式的結構#回傳的結果:#$result["status"],執行是否成功"true"代表執行成功,"false"代表執行失敗#$result["error"],錯誤訊息陣列#$result["mustBeFilled"]["dataCount"],不可省略的參數陣列元素數量#$result["optionalFilled"]["dataCount"],可省略的參數陣列元素數量#$result["mustBeFilled"]["name"],不可省略的參數陣列#$result["mustBeFilled"]["comment"],不可省略的參數註解陣列#$result["optionalFilled"]["name"],可省略的參數陣列#$result["optionalFilled"]["comment"],可省略的參數註解陣列#$result["reference"]["addr"],參考資料的網址#$result["reference"]["comment"],參考資料的說明#必填的參數:$conf["phpFileAddress"]="../phpLib.php";#含有函式內容的php檔案位置與名稱#$conf["fileArgu"],字串,__FILE__的內容.$conf["fileArgu"]=__FILE__;$conf["functionName"]="getMutiFunctionConstruction";#函式的名稱$getFunctionConstruction=phpLib::getFunctionConstruction($conf);unset($conf);var_dump($getFunctionConstruction);*//*#提示目前在測試的函式echo "<hr>phpLib::getFunctionConstruction - testCase 4<p>";#函式說明:#取得函式的結構#回傳的結果:#$result["status"],執行是否成功"true"代表執行成功,"false"代表執行失敗#$result["error"],錯誤訊息陣列#$result["mustBeFilled"]["dataCount"],不可省略的參數陣列元素數量#$result["optionalFilled"]["dataCount"],可省略的參數陣列元素數量#$result["mustBeFilled"]["name"],不可省略的參數陣列#$result["mustBeFilled"]["comment"],不可省略的參數註解陣列#$result["optionalFilled"]["name"],可省略的參數陣列#$result["optionalFilled"]["comment"],可省略的參數註解陣列#$result["reference"]["addr"],參考資料的網址#$result["reference"]["comment"],參考資料的說明#必填的參數:$conf["phpFileAddress"]="../R.php";#含有函式內容的php檔案位置與名稱#$conf["fileArgu"],字串,__FILE__的內容.$conf["fileArgu"]=__FILE__;$conf["functionName"]="executeR";#函式的名稱$getFunctionConstruction=phpLib::getFunctionConstruction($conf);unset($conf);var_dump($getFunctionConstruction);*//*#提示目前在測試的函式echo "<hr>phpLib::classDiagramMaker - testCase 1<p>";#函式說明:#提供將含有類別宣告的php檔案轉成類別圖的功能#回傳的內容:#$result["status"],執行是否成功,"true"代表執行成功;"false"代表執行失敗。#$result["error"],錯誤訊息陣列#$result["diagramCode"],類別圖的網頁code#必填的參數:$conf["phpFileAddress"]="../phpLib.php";#含有宣告類別的php檔案$conf["fileArgu"]=__FILE__;#可省略的參數:#備註:該函式尚在開發中...$classDiagramMaker=phpLib::classDiagramMaker($conf);unset($conf);#如果執行失敗if($classDiagramMaker["status"]==="false"){#印出結果var_dump($classDiagramMaker);#停止執行exit;}#印出內容echo $classDiagramMaker["diagramCode"];*//*#提示目前在測試的函式echo "<hr>phpLib::classDiagramMaker - testCase 2<p>";#函式說明:#提供將含有類別宣告的php檔案轉成類別圖的功能#回傳的內容:#$result["status"],執行是否成功,"true"代表執行成功;"false"代表執行失敗。#$result["error"],錯誤訊息陣列#$result["diagramCode"],類別圖的網頁code#必填的參數:$conf["phpFileAddress"]="../analyse.php";#含有宣告類別的php檔案$conf["fileArgu"]=__FILE__;#可省略的參數:#備註:該函式尚在開發中...$classDiagramMaker=phpLib::classDiagramMaker($conf);unset($conf);#如果執行失敗if($classDiagramMaker["status"]==="false"){#印出結果var_dump($classDiagramMaker);#停止執行exit;}#印出內容echo $classDiagramMaker["diagramCode"];*//*#提示目前在測試的函式echo "<hr>phpLib::classDiagramMaker - testCase 3<p>";#函式說明:#提供將含有類別宣告的php檔案轉成類別圖的功能#回傳的內容:#$result["status"],執行是否成功,"true"代表執行成功;"false"代表執行失敗。#$result["error"],錯誤訊息陣列#$result["diagramCode"],類別圖的網頁code#必填的參數:$conf["phpFileAddress"]="../fuse.php";#含有宣告類別的php檔案$conf["fileArgu"]=__FILE__;#可省略的參數:#備註:該函式尚在開發中...$classDiagramMaker=phpLib::classDiagramMaker($conf);unset($conf);#如果執行失敗if($classDiagramMaker["status"]==="false"){#印出結果var_dump($classDiagramMaker);#停止執行exit;}#印出內容echo $classDiagramMaker["diagramCode"];*//*#提示目前在測試的函式echo "<hr>phpLib::classDiagramMaker - testCase 4<p>";#函式說明:#提供將含有類別宣告的php檔案轉成類別圖的功能#回傳的內容:#$result["status"],執行是否成功,"true"代表執行成功;"false"代表執行失敗。#$result["error"],錯誤訊息陣列#$result["diagramCode"],類別圖的網頁code#必填的參數:$conf["phpFileAddress"]="../googleMap.php";#含有宣告類別的php檔案$conf["fileArgu"]=__FILE__;#可省略的參數:#備註:該函式尚在開發中...$classDiagramMaker=phpLib::classDiagramMaker($conf);unset($conf);#如果執行失敗if($classDiagramMaker["status"]==="false"){#印出結果var_dump($classDiagramMaker);#停止執行exit;}#印出內容echo $classDiagramMaker["diagramCode"];*//*#提示目前在測試的函式echo "<hr>phpLib::classDiagramMaker - testCase 5<p>";#函式說明:#提供將含有類別宣告的php檔案轉成類別圖的功能#回傳的內容:#$result["status"],執行是否成功,"true"代表執行成功;"false"代表執行失敗。#$result["error"],錯誤訊息陣列#$result["diagramCode"],類別圖的網頁code#必填的參數:$conf["phpFileAddress"]="../javaScript.php";#含有宣告類別的php檔案$conf["fileArgu"]=__FILE__;#可省略的參數:#備註:該函式尚在開發中...$classDiagramMaker=phpLib::classDiagramMaker($conf);unset($conf);#如果執行失敗if($classDiagramMaker["status"]==="false"){#印出結果var_dump($classDiagramMaker);#停止執行exit;}#印出內容echo $classDiagramMaker["diagramCode"];*//*#提示目前在測試的函式echo "<hr>phpLib::classDiagramMaker - testCase 6<p>";#函式說明:#提供將含有類別宣告的php檔案轉成類別圖的功能#回傳的內容:#$result["status"],執行是否成功,"true"代表執行成功;"false"代表執行失敗。#$result["error"],錯誤訊息陣列#$result["diagramCode"],類別圖的網頁code#必填的參數:$conf["phpFileAddress"]="../line.php";#含有宣告類別的php檔案$conf["fileArgu"]=__FILE__;#可省略的參數:#備註:該函式尚在開發中...$classDiagramMaker=phpLib::classDiagramMaker($conf);unset($conf);#如果執行失敗if($classDiagramMaker["status"]==="false"){#印出結果var_dump($classDiagramMaker);#停止執行exit;}#印出內容echo $classDiagramMaker["diagramCode"];*//*#提示目前在測試的函式echo "<hr>phpLib::classDiagramMaker - testCase 7<p>";#函式說明:#提供將含有類別宣告的php檔案轉成類別圖的功能#回傳的內容:#$result["status"],執行是否成功,"true"代表執行成功;"false"代表執行失敗。#$result["error"],錯誤訊息陣列#$result["diagramCode"],類別圖的網頁code#必填的參數:$conf["phpFileAddress"]="../stringProcess.php";#含有宣告類別的php檔案$conf["fileArgu"]=__FILE__;#可省略的參數:#備註:該函式尚在開發中...$classDiagramMaker=phpLib::classDiagramMaker($conf);unset($conf);#如果執行失敗if($classDiagramMaker["status"]==="false"){#印出結果var_dump($classDiagramMaker);#停止執行exit;}#印出內容echo $classDiagramMaker["diagramCode"];*//*#提示目前在測試的函式echo "<hr>phpLib::classDiagramMaker - testCase 8<p>";#函式說明:#提供將含有類別宣告的php檔案轉成類別圖的功能#回傳的內容:#$result["status"],執行是否成功,"true"代表執行成功;"false"代表執行失敗。#$result["error"],錯誤訊息陣列#$result["diagramCode"],類別圖的網頁code#必填的參數:$conf["phpFileAddress"]="../webSock.php";#含有宣告類別的php檔案$conf["fileArgu"]=__FILE__;#可省略的參數:#備註:該函式尚在開發中...$classDiagramMaker=phpLib::classDiagramMaker($conf);unset($conf);#如果執行失敗if($classDiagramMaker["status"]==="false"){#印出結果var_dump($classDiagramMaker);#停止執行exit;}#印出內容echo $classDiagramMaker["diagramCode"];*//*#提示目前在測試的函式echo "<hr>phpLib::classDiagramsMaker - testCase 9<p>";#函式說明:#提供將目標目錄裡的所有php檔案轉成類別圖的功能#回傳的內容:#$result["status"],執行是否成功,"true"代表執行成功;"false"代表執行失敗。#$result["error"],錯誤訊息陣列#$result["diagramCode"][$i],第$i+1個類別圖的網頁code#必填的參數:$conf["phpDirAddress"]="../";#含有宣告類別的php檔案目錄,""代表當前目錄。$conf["fileArgu"]=__FILE__;$classDiagramsMaker=phpLib::classDiagramsMaker($conf);unset($conf);#如果執行失敗if($classDiagramsMaker["status"]==="false"){#印出結果var_dump($classDiagramsMaker);#停止執行exit;}#if end#涵式說明:#將字串寫入到檔案#回傳的結果:#$result["status"],"true"表示檔案寫入成功,"false"表示檔案寫入失敗.#$result["error"],錯誤訊息陣列.#$result["function"],當前執行的函數名稱.#$result["fileInfo"],實際上寫入的檔案資訊陣列.#$result["fileInfo"]["createdFileName"],建立好的檔案名稱.#$result["fileInfo"]["createdFilePath"],檔案建立的路徑.#$result["fileInfo"]["createdFilePathAndName"].建立好的檔案名稱與路徑.#必填的參數:#$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑$conf["fileArgu"]=__FILE__;#可省略的參數:#$conf["fileName"],字串,爲要編輯的檔案名稱,預設為隨機產生的檔案名稱.$conf["fileName"]="phpLibT/classDiagramsMaker.html";#$conf["inputString"],字串,爲要寫入到裏面的內容,若要每筆資料寫入後換行,則可以在字串內容後面加上 \r\n 即可,預設為"".#$conf["inputString"]="";#$conf["writeMethod"],字串,爲檔案撰寫的方式,可省略,是複寫'a'還是,重新寫入'w',預設爲'w',重新寫入.#$conf["writeMethod"]="a";#$conf["checkRepeat"],字串,"true"代表建立檔案之前要先檢查檔案是否存在,若存在則在原名稱後面加上從(1)開始的編號.#$conf["checkRepeat"]="";#$conf["filenameExtensionStartPoint"],字串,檔案的副檔名是從倒數第幾個小數點(dot)開始,預設為"1",最後一個小數點,必須與$conf["checkRepeat"]搭配才會生效.#$conf["filenameExtensionStartPoint"]="";#$conf["repeatNameRule"],字串,遇到相同名稱的檔案要如何加上識別的編號,編號用「\$i」表示,預設為"(\$i)",必須與$conf["checkRepeat"]搭配才會生效.#$conf["repeatNameRule"]="";$writeTextIntoFile=fileAccess::writeTextIntoFile($conf);unset($conf);#如果寫入檔案失敗if($writeTextIntoFile["status"]==="false"){#印出結果var_dump($writeTextIntoFile);#停止執行exit;}foreach($classDiagramsMaker["diagramCode"] as $html){#涵式說明:#將字串寫入到檔案#回傳的結果:#$result["status"],"true"表示檔案寫入成功,"false"表示檔案寫入失敗.#$result["error"],錯誤訊息陣列.#$result["function"],當前執行的函數名稱.#$result["fileInfo"],實際上寫入的檔案資訊陣列.#$result["fileInfo"]["createdFileName"],建立好的檔案名稱.#$result["fileInfo"]["createdFilePath"],檔案建立的路徑.#$result["fileInfo"]["createdFilePathAndName"].建立好的檔案名稱與路徑.#必填的參數:#$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑$conf["fileArgu"]=__FILE__;#可省略的參數:#$conf["fileName"],字串,爲要編輯的檔案名稱,預設為隨機產生的檔案名稱.$conf["fileName"]="phpLibT/classDiagramsMaker.html";#$conf["inputString"],字串,爲要寫入到裏面的內容,若要每筆資料寫入後換行,則可以在字串內容後面加上 \r\n 即可,預設為"".$conf["inputString"]=$html;#$conf["writeMethod"],字串,爲檔案撰寫的方式,可省略,是複寫'a'還是,重新寫入'w',預設爲'w',重新寫入.$conf["writeMethod"]="a";#$conf["checkRepeat"],字串,"true"代表建立檔案之前要先檢查檔案是否存在,若存在則在原名稱後面加上從(1)開始的編號.#$conf["checkRepeat"]="";#$conf["filenameExtensionStartPoint"],字串,檔案的副檔名是從倒數第幾個小數點(dot)開始,預設為"1",最後一個小數點,必須與$conf["checkRepeat"]搭配才會生效.#$conf["filenameExtensionStartPoint"]="";#$conf["repeatNameRule"],字串,遇到相同名稱的檔案要如何加上識別的編號,編號用「\$i」表示,預設為"(\$i)",必須與$conf["checkRepeat"]搭配才會生效.#$conf["repeatNameRule"]="";$writeTextIntoFile=fileAccess::writeTextIntoFile($conf);unset($conf);#如果寫入檔案失敗if($writeTextIntoFile["status"]==="false"){#印出結果var_dump($writeTextIntoFile);#停止執行exit;}}*/?>