| 14 |
liveuser |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
#指派命名空間
|
|
|
4 |
namespace qbpwcf;
|
|
|
5 |
|
|
|
6 |
#匯入外部套件
|
|
|
7 |
include("../allInOne.php");
|
|
|
8 |
|
|
|
9 |
/*
|
|
|
10 |
|
|
|
11 |
#提示目前在測試的函式
|
|
|
12 |
echo "<hr>phpLib::getLibFileList - testCase 1<p>";
|
|
|
13 |
|
|
|
14 |
#函式說明:
|
|
|
15 |
#取得函式庫目錄底下的檔案
|
|
|
16 |
#必填的參數:
|
|
|
17 |
$conf["folderAddress"]="../";#要讀取的函式庫目錄
|
|
|
18 |
#$conf["fileArgu"],字串__FILE__的內容.
|
|
|
19 |
$conf["fileArgu"]=__FILE__;
|
|
|
20 |
#可省略的參數:
|
|
|
21 |
$conf["readFileType"]=array("php","js","css");#要讀取具有該陣列底下副檔名的檔案
|
|
|
22 |
var_dump(phpLib::getLibFileList($conf));
|
|
|
23 |
|
|
|
24 |
*/
|
|
|
25 |
|
|
|
26 |
/*
|
|
|
27 |
|
|
|
28 |
#提示目前在測試的函式
|
|
|
29 |
echo "<hr>phpLib::getPhpLibConstruction - testCase 1<p>";
|
|
|
30 |
|
|
|
31 |
#函式說明:
|
|
|
32 |
#取得php函式庫檔案的內容
|
|
|
33 |
#回傳的結果:
|
|
|
34 |
#$result["status"],0表示取得成功;1表示取得失敗
|
|
|
35 |
#$result["namesapceCount"],命名空間的筆數
|
|
|
36 |
#$result["classCount"],類別的筆數
|
|
|
37 |
#$result["founctionCount"],函式的筆數
|
|
|
38 |
#$result["namespace"],命名空間陣列
|
|
|
39 |
#$result["class"],類別的陣列
|
|
|
40 |
#$result["function"],函式的陣列
|
|
|
41 |
#必填的參數:
|
|
|
42 |
$conf["libFileAddress"]="../phpLib.php";#要讀取的函式庫檔案位置
|
|
|
43 |
#$conf["fileArgu"],字串,__FILE__的內容.
|
|
|
44 |
$conf["fileArgu"]=__FILE__;
|
|
|
45 |
$result["phpLib"]["getPhpLibConstruction"]=phpLib::getPhpLibConstruction($conf);
|
|
|
46 |
unset($conf);
|
|
|
47 |
|
|
|
48 |
#留存php檔案類別結構
|
|
|
49 |
$phpFileConstruction=$result["phpLib"]["getPhpLibConstruction"];
|
|
|
50 |
|
|
|
51 |
var_dump($result["phpLib"]["getPhpLibConstruction"]);
|
|
|
52 |
|
|
|
53 |
*/
|
|
|
54 |
|
|
|
55 |
/*
|
|
|
56 |
|
|
|
57 |
#提示目前在測試的函式
|
|
|
58 |
echo "<hr>phpLib::getPhpLibConstruction - testCase 2<p>";
|
|
|
59 |
|
|
|
60 |
#函式說明:
|
|
|
61 |
#取得php函式庫檔案的內容
|
|
|
62 |
#回傳的結果:
|
|
|
63 |
#$result["status"],0表示取得成功;1表示取得失敗
|
|
|
64 |
#$result["namesapceCount"],命名空間的筆數
|
|
|
65 |
#$result["classCount"],類別的筆數
|
|
|
66 |
#$result["founctionCount"],函式的筆數
|
|
|
67 |
#$result["namespace"],命名空間陣列
|
|
|
68 |
#$result["class"],類別的陣列
|
|
|
69 |
#$result["function"],函式的陣列
|
|
|
70 |
#必填的參數:
|
|
|
71 |
$conf["libFileAddress"]="../amazon.php";#要讀取的函式庫檔案位置
|
|
|
72 |
#$conf["fileArgu"],字串,__FILE__的內容.
|
|
|
73 |
$conf["fileArgu"]=__FILE__;
|
|
|
74 |
$result["phpLib"]["getPhpLibConstruction"]=phpLib::getPhpLibConstruction($conf);
|
|
|
75 |
unset($conf);
|
|
|
76 |
|
|
|
77 |
#留存php檔案類別結構
|
|
|
78 |
$phpFileConstruction=$result["phpLib"]["getPhpLibConstruction"];
|
|
|
79 |
|
|
|
80 |
var_dump($result["phpLib"]["getPhpLibConstruction"]);
|
|
|
81 |
|
|
|
82 |
*/
|
|
|
83 |
|
|
|
84 |
/*
|
|
|
85 |
|
|
|
86 |
#提示目前在測試的函式
|
|
|
87 |
echo "<hr>phpLib::getPhpLibConstruction - testCase 3<p>";
|
|
|
88 |
|
|
|
89 |
#函式說明:
|
|
|
90 |
#取得php函式庫檔案的內容
|
|
|
91 |
#回傳的結果:
|
|
|
92 |
#$result["status"],0表示取得成功;1表示取得失敗
|
|
|
93 |
#$result["namesapceCount"],命名空間的筆數
|
|
|
94 |
#$result["classCount"],類別的筆數
|
|
|
95 |
#$result["founctionCount"],函式的筆數
|
|
|
96 |
#$result["namespace"],命名空間陣列
|
|
|
97 |
#$result["class"],類別的陣列
|
|
|
98 |
#$result["function"],函式的陣列
|
|
|
99 |
#必填的參數:
|
|
|
100 |
$conf["libFileAddress"]="../analyse.php";#要讀取的函式庫檔案位置
|
|
|
101 |
#$conf["fileArgu"],字串,__FILE__的內容.
|
|
|
102 |
$conf["fileArgu"]=__FILE__;
|
|
|
103 |
$result["phpLib"]["getPhpLibConstruction"]=phpLib::getPhpLibConstruction($conf);
|
|
|
104 |
unset($conf);
|
|
|
105 |
|
|
|
106 |
#留存php檔案類別結構
|
|
|
107 |
$phpFileConstruction=$result["phpLib"]["getPhpLibConstruction"];
|
|
|
108 |
|
|
|
109 |
var_dump($result["phpLib"]["getPhpLibConstruction"]);
|
|
|
110 |
|
|
|
111 |
*/
|
|
|
112 |
|
|
|
113 |
/*
|
|
|
114 |
|
|
|
115 |
#提示目前在測試的函式
|
|
|
116 |
echo "<hr>phpLib::getFunctionConstruction - testCase 1<p>";
|
|
|
117 |
|
|
|
118 |
#函式說明:
|
|
|
119 |
#取得函式的結構
|
|
|
120 |
#回傳的結果:
|
|
|
121 |
#$result["status"],執行是否成功"true"代表執行成功,"false"代表執行失敗
|
|
|
122 |
#$result["error"],錯誤訊息陣列
|
|
|
123 |
#$result["mustBeFilled"]["dataCount"],不可省略的參數陣列元素數量
|
|
|
124 |
#$result["optionalFilled"]["dataCount"],可省略的參數陣列元素數量
|
|
|
125 |
#$result["mustBeFilled"]["name"],不可省略的參數陣列
|
|
|
126 |
#$result["mustBeFilled"]["comment"],不可省略的參數註解陣列
|
|
|
127 |
#$result["optionalFilled"]["name"],可省略的參數陣列
|
|
|
128 |
#$result["optionalFilled"]["comment"],可省略的參數註解陣列
|
|
|
129 |
#$result["reference"]["addr"],參考資料的網址
|
|
|
130 |
#$result["reference"]["comment"],參考資料的說明
|
|
|
131 |
#必填的參數:
|
|
|
132 |
$conf["phpFileAddress"]="../phpLib.php";#含有函式內容的php檔案位置與名稱
|
|
|
133 |
#$conf["fileArgu"],字串,__FILE__的內容.
|
|
|
134 |
$conf["fileArgu"]=__FILE__;
|
|
|
135 |
$conf["functionName"]="getFunctionConstruction";#函式的名稱
|
|
|
136 |
$getFunctionConstruction=phpLib::getFunctionConstruction($conf);
|
|
|
137 |
unset($conf);
|
|
|
138 |
|
|
|
139 |
var_dump($getFunctionConstruction);
|
|
|
140 |
|
|
|
141 |
*/
|
|
|
142 |
|
|
|
143 |
/*
|
|
|
144 |
|
|
|
145 |
#提示目前在測試的函式
|
|
|
146 |
echo "<hr>phpLib::getFunctionConstruction - testCase 2<p>";
|
|
|
147 |
|
|
|
148 |
#函式說明:
|
|
|
149 |
#取得函式的結構
|
|
|
150 |
#回傳的結果:
|
|
|
151 |
#$result["status"],執行是否成功"true"代表執行成功,"false"代表執行失敗
|
|
|
152 |
#$result["error"],錯誤訊息陣列
|
|
|
153 |
#$result["mustBeFilled"]["dataCount"],不可省略的參數陣列元素數量
|
|
|
154 |
#$result["optionalFilled"]["dataCount"],可省略的參數陣列元素數量
|
|
|
155 |
#$result["mustBeFilled"]["name"],不可省略的參數陣列
|
|
|
156 |
#$result["mustBeFilled"]["comment"],不可省略的參數註解陣列
|
|
|
157 |
#$result["optionalFilled"]["name"],可省略的參數陣列
|
|
|
158 |
#$result["optionalFilled"]["comment"],可省略的參數註解陣列
|
|
|
159 |
#$result["reference"]["addr"],參考資料的網址
|
|
|
160 |
#$result["reference"]["comment"],參考資料的說明
|
|
|
161 |
#必填的參數:
|
|
|
162 |
$conf["phpFileAddress"]="../phpLib.php";#含有函式內容的php檔案位置與名稱
|
|
|
163 |
#$conf["fileArgu"],字串,__FILE__的內容.
|
|
|
164 |
$conf["fileArgu"]=__FILE__;
|
|
|
165 |
$conf["functionName"]="getLibFileList";#函式的名稱
|
|
|
166 |
$getFunctionConstruction=phpLib::getFunctionConstruction($conf);
|
|
|
167 |
unset($conf);
|
|
|
168 |
|
|
|
169 |
var_dump($getFunctionConstruction);
|
|
|
170 |
|
|
|
171 |
*/
|
|
|
172 |
|
|
|
173 |
/*
|
|
|
174 |
|
|
|
175 |
#提示目前在測試的函式
|
|
|
176 |
echo "<hr>phpLib::getFunctionConstruction - testCase 3<p>";
|
|
|
177 |
|
|
|
178 |
#函式說明:
|
|
|
179 |
#取得函式的結構
|
|
|
180 |
#回傳的結果:
|
|
|
181 |
#$result["status"],執行是否成功"true"代表執行成功,"false"代表執行失敗
|
|
|
182 |
#$result["error"],錯誤訊息陣列
|
|
|
183 |
#$result["mustBeFilled"]["dataCount"],不可省略的參數陣列元素數量
|
|
|
184 |
#$result["optionalFilled"]["dataCount"],可省略的參數陣列元素數量
|
|
|
185 |
#$result["mustBeFilled"]["name"],不可省略的參數陣列
|
|
|
186 |
#$result["mustBeFilled"]["comment"],不可省略的參數註解陣列
|
|
|
187 |
#$result["optionalFilled"]["name"],可省略的參數陣列
|
|
|
188 |
#$result["optionalFilled"]["comment"],可省略的參數註解陣列
|
|
|
189 |
#$result["reference"]["addr"],參考資料的網址
|
|
|
190 |
#$result["reference"]["comment"],參考資料的說明
|
|
|
191 |
#必填的參數:
|
|
|
192 |
$conf["phpFileAddress"]="../phpLib.php";#含有函式內容的php檔案位置與名稱
|
|
|
193 |
#$conf["fileArgu"],字串,__FILE__的內容.
|
|
|
194 |
$conf["fileArgu"]=__FILE__;
|
|
|
195 |
$conf["functionName"]="getMutiFunctionConstruction";#函式的名稱
|
|
|
196 |
$getFunctionConstruction=phpLib::getFunctionConstruction($conf);
|
|
|
197 |
unset($conf);
|
|
|
198 |
|
|
|
199 |
var_dump($getFunctionConstruction);
|
|
|
200 |
|
|
|
201 |
*/
|
|
|
202 |
|
|
|
203 |
/*
|
|
|
204 |
|
|
|
205 |
#提示目前在測試的函式
|
|
|
206 |
echo "<hr>phpLib::getFunctionConstruction - testCase 4<p>";
|
|
|
207 |
|
|
|
208 |
#函式說明:
|
|
|
209 |
#取得函式的結構
|
|
|
210 |
#回傳的結果:
|
|
|
211 |
#$result["status"],執行是否成功"true"代表執行成功,"false"代表執行失敗
|
|
|
212 |
#$result["error"],錯誤訊息陣列
|
|
|
213 |
#$result["mustBeFilled"]["dataCount"],不可省略的參數陣列元素數量
|
|
|
214 |
#$result["optionalFilled"]["dataCount"],可省略的參數陣列元素數量
|
|
|
215 |
#$result["mustBeFilled"]["name"],不可省略的參數陣列
|
|
|
216 |
#$result["mustBeFilled"]["comment"],不可省略的參數註解陣列
|
|
|
217 |
#$result["optionalFilled"]["name"],可省略的參數陣列
|
|
|
218 |
#$result["optionalFilled"]["comment"],可省略的參數註解陣列
|
|
|
219 |
#$result["reference"]["addr"],參考資料的網址
|
|
|
220 |
#$result["reference"]["comment"],參考資料的說明
|
|
|
221 |
#必填的參數:
|
|
|
222 |
$conf["phpFileAddress"]="../R.php";#含有函式內容的php檔案位置與名稱
|
|
|
223 |
#$conf["fileArgu"],字串,__FILE__的內容.
|
|
|
224 |
$conf["fileArgu"]=__FILE__;
|
|
|
225 |
$conf["functionName"]="executeR";#函式的名稱
|
|
|
226 |
$getFunctionConstruction=phpLib::getFunctionConstruction($conf);
|
|
|
227 |
unset($conf);
|
|
|
228 |
|
|
|
229 |
var_dump($getFunctionConstruction);
|
|
|
230 |
|
|
|
231 |
*/
|
|
|
232 |
|
|
|
233 |
/*
|
|
|
234 |
|
|
|
235 |
#提示目前在測試的函式
|
|
|
236 |
echo "<hr>phpLib::classDiagramMaker - testCase 1<p>";
|
|
|
237 |
|
|
|
238 |
#函式說明:
|
|
|
239 |
#提供將含有類別宣告的php檔案轉成類別圖的功能
|
|
|
240 |
#回傳的內容:
|
|
|
241 |
#$result["status"],執行是否成功,"true"代表執行成功;"false"代表執行失敗。
|
|
|
242 |
#$result["error"],錯誤訊息陣列
|
|
|
243 |
#$result["diagramCode"],類別圖的網頁code
|
|
|
244 |
#必填的參數:
|
|
|
245 |
$conf["phpFileAddress"]="../phpLib.php";#含有宣告類別的php檔案
|
|
|
246 |
$conf["fileArgu"]=__FILE__;
|
|
|
247 |
#可省略的參數:
|
|
|
248 |
#備註:該函式尚在開發中...
|
|
|
249 |
$classDiagramMaker=phpLib::classDiagramMaker($conf);
|
|
|
250 |
unset($conf);
|
|
|
251 |
|
|
|
252 |
#如果執行失敗
|
|
|
253 |
if($classDiagramMaker["status"]==="false"){
|
|
|
254 |
|
|
|
255 |
#印出結果
|
|
|
256 |
var_dump($classDiagramMaker);
|
|
|
257 |
|
|
|
258 |
#停止執行
|
|
|
259 |
exit;
|
|
|
260 |
|
|
|
261 |
}
|
|
|
262 |
|
|
|
263 |
#印出內容
|
|
|
264 |
echo $classDiagramMaker["diagramCode"];
|
|
|
265 |
|
|
|
266 |
*/
|
|
|
267 |
|
|
|
268 |
/*
|
|
|
269 |
|
|
|
270 |
#提示目前在測試的函式
|
|
|
271 |
echo "<hr>phpLib::classDiagramMaker - testCase 2<p>";
|
|
|
272 |
|
|
|
273 |
#函式說明:
|
|
|
274 |
#提供將含有類別宣告的php檔案轉成類別圖的功能
|
|
|
275 |
#回傳的內容:
|
|
|
276 |
#$result["status"],執行是否成功,"true"代表執行成功;"false"代表執行失敗。
|
|
|
277 |
#$result["error"],錯誤訊息陣列
|
|
|
278 |
#$result["diagramCode"],類別圖的網頁code
|
|
|
279 |
#必填的參數:
|
|
|
280 |
$conf["phpFileAddress"]="../analyse.php";#含有宣告類別的php檔案
|
|
|
281 |
$conf["fileArgu"]=__FILE__;
|
|
|
282 |
#可省略的參數:
|
|
|
283 |
#備註:該函式尚在開發中...
|
|
|
284 |
$classDiagramMaker=phpLib::classDiagramMaker($conf);
|
|
|
285 |
unset($conf);
|
|
|
286 |
|
|
|
287 |
#如果執行失敗
|
|
|
288 |
if($classDiagramMaker["status"]==="false"){
|
|
|
289 |
|
|
|
290 |
#印出結果
|
|
|
291 |
var_dump($classDiagramMaker);
|
|
|
292 |
|
|
|
293 |
#停止執行
|
|
|
294 |
exit;
|
|
|
295 |
|
|
|
296 |
}
|
|
|
297 |
|
|
|
298 |
#印出內容
|
|
|
299 |
echo $classDiagramMaker["diagramCode"];
|
|
|
300 |
|
|
|
301 |
*/
|
|
|
302 |
|
|
|
303 |
/*
|
|
|
304 |
|
|
|
305 |
#提示目前在測試的函式
|
|
|
306 |
echo "<hr>phpLib::classDiagramMaker - testCase 3<p>";
|
|
|
307 |
|
|
|
308 |
#函式說明:
|
|
|
309 |
#提供將含有類別宣告的php檔案轉成類別圖的功能
|
|
|
310 |
#回傳的內容:
|
|
|
311 |
#$result["status"],執行是否成功,"true"代表執行成功;"false"代表執行失敗。
|
|
|
312 |
#$result["error"],錯誤訊息陣列
|
|
|
313 |
#$result["diagramCode"],類別圖的網頁code
|
|
|
314 |
#必填的參數:
|
|
|
315 |
$conf["phpFileAddress"]="../fuse.php";#含有宣告類別的php檔案
|
|
|
316 |
$conf["fileArgu"]=__FILE__;
|
|
|
317 |
#可省略的參數:
|
|
|
318 |
#備註:該函式尚在開發中...
|
|
|
319 |
$classDiagramMaker=phpLib::classDiagramMaker($conf);
|
|
|
320 |
unset($conf);
|
|
|
321 |
|
|
|
322 |
#如果執行失敗
|
|
|
323 |
if($classDiagramMaker["status"]==="false"){
|
|
|
324 |
|
|
|
325 |
#印出結果
|
|
|
326 |
var_dump($classDiagramMaker);
|
|
|
327 |
|
|
|
328 |
#停止執行
|
|
|
329 |
exit;
|
|
|
330 |
|
|
|
331 |
}
|
|
|
332 |
|
|
|
333 |
#印出內容
|
|
|
334 |
echo $classDiagramMaker["diagramCode"];
|
|
|
335 |
|
|
|
336 |
*/
|
|
|
337 |
|
|
|
338 |
/*
|
|
|
339 |
|
|
|
340 |
#提示目前在測試的函式
|
|
|
341 |
echo "<hr>phpLib::classDiagramMaker - testCase 4<p>";
|
|
|
342 |
|
|
|
343 |
#函式說明:
|
|
|
344 |
#提供將含有類別宣告的php檔案轉成類別圖的功能
|
|
|
345 |
#回傳的內容:
|
|
|
346 |
#$result["status"],執行是否成功,"true"代表執行成功;"false"代表執行失敗。
|
|
|
347 |
#$result["error"],錯誤訊息陣列
|
|
|
348 |
#$result["diagramCode"],類別圖的網頁code
|
|
|
349 |
#必填的參數:
|
|
|
350 |
$conf["phpFileAddress"]="../googleMap.php";#含有宣告類別的php檔案
|
|
|
351 |
$conf["fileArgu"]=__FILE__;
|
|
|
352 |
#可省略的參數:
|
|
|
353 |
#備註:該函式尚在開發中...
|
|
|
354 |
$classDiagramMaker=phpLib::classDiagramMaker($conf);
|
|
|
355 |
unset($conf);
|
|
|
356 |
|
|
|
357 |
#如果執行失敗
|
|
|
358 |
if($classDiagramMaker["status"]==="false"){
|
|
|
359 |
|
|
|
360 |
#印出結果
|
|
|
361 |
var_dump($classDiagramMaker);
|
|
|
362 |
|
|
|
363 |
#停止執行
|
|
|
364 |
exit;
|
|
|
365 |
|
|
|
366 |
}
|
|
|
367 |
|
|
|
368 |
#印出內容
|
|
|
369 |
echo $classDiagramMaker["diagramCode"];
|
|
|
370 |
|
|
|
371 |
*/
|
|
|
372 |
|
|
|
373 |
/*
|
|
|
374 |
|
|
|
375 |
#提示目前在測試的函式
|
|
|
376 |
echo "<hr>phpLib::classDiagramMaker - testCase 5<p>";
|
|
|
377 |
|
|
|
378 |
#函式說明:
|
|
|
379 |
#提供將含有類別宣告的php檔案轉成類別圖的功能
|
|
|
380 |
#回傳的內容:
|
|
|
381 |
#$result["status"],執行是否成功,"true"代表執行成功;"false"代表執行失敗。
|
|
|
382 |
#$result["error"],錯誤訊息陣列
|
|
|
383 |
#$result["diagramCode"],類別圖的網頁code
|
|
|
384 |
#必填的參數:
|
|
|
385 |
$conf["phpFileAddress"]="../javaScript.php";#含有宣告類別的php檔案
|
|
|
386 |
$conf["fileArgu"]=__FILE__;
|
|
|
387 |
#可省略的參數:
|
|
|
388 |
#備註:該函式尚在開發中...
|
|
|
389 |
$classDiagramMaker=phpLib::classDiagramMaker($conf);
|
|
|
390 |
unset($conf);
|
|
|
391 |
|
|
|
392 |
#如果執行失敗
|
|
|
393 |
if($classDiagramMaker["status"]==="false"){
|
|
|
394 |
|
|
|
395 |
#印出結果
|
|
|
396 |
var_dump($classDiagramMaker);
|
|
|
397 |
|
|
|
398 |
#停止執行
|
|
|
399 |
exit;
|
|
|
400 |
|
|
|
401 |
}
|
|
|
402 |
|
|
|
403 |
#印出內容
|
|
|
404 |
echo $classDiagramMaker["diagramCode"];
|
|
|
405 |
|
|
|
406 |
*/
|
|
|
407 |
|
|
|
408 |
/*
|
|
|
409 |
|
|
|
410 |
#提示目前在測試的函式
|
|
|
411 |
echo "<hr>phpLib::classDiagramMaker - testCase 6<p>";
|
|
|
412 |
|
|
|
413 |
#函式說明:
|
|
|
414 |
#提供將含有類別宣告的php檔案轉成類別圖的功能
|
|
|
415 |
#回傳的內容:
|
|
|
416 |
#$result["status"],執行是否成功,"true"代表執行成功;"false"代表執行失敗。
|
|
|
417 |
#$result["error"],錯誤訊息陣列
|
|
|
418 |
#$result["diagramCode"],類別圖的網頁code
|
|
|
419 |
#必填的參數:
|
|
|
420 |
$conf["phpFileAddress"]="../line.php";#含有宣告類別的php檔案
|
|
|
421 |
$conf["fileArgu"]=__FILE__;
|
|
|
422 |
#可省略的參數:
|
|
|
423 |
#備註:該函式尚在開發中...
|
|
|
424 |
$classDiagramMaker=phpLib::classDiagramMaker($conf);
|
|
|
425 |
unset($conf);
|
|
|
426 |
|
|
|
427 |
#如果執行失敗
|
|
|
428 |
if($classDiagramMaker["status"]==="false"){
|
|
|
429 |
|
|
|
430 |
#印出結果
|
|
|
431 |
var_dump($classDiagramMaker);
|
|
|
432 |
|
|
|
433 |
#停止執行
|
|
|
434 |
exit;
|
|
|
435 |
|
|
|
436 |
}
|
|
|
437 |
|
|
|
438 |
#印出內容
|
|
|
439 |
echo $classDiagramMaker["diagramCode"];
|
|
|
440 |
|
|
|
441 |
*/
|
|
|
442 |
|
|
|
443 |
/*
|
|
|
444 |
|
|
|
445 |
#提示目前在測試的函式
|
|
|
446 |
echo "<hr>phpLib::classDiagramMaker - testCase 7<p>";
|
|
|
447 |
|
|
|
448 |
#函式說明:
|
|
|
449 |
#提供將含有類別宣告的php檔案轉成類別圖的功能
|
|
|
450 |
#回傳的內容:
|
|
|
451 |
#$result["status"],執行是否成功,"true"代表執行成功;"false"代表執行失敗。
|
|
|
452 |
#$result["error"],錯誤訊息陣列
|
|
|
453 |
#$result["diagramCode"],類別圖的網頁code
|
|
|
454 |
#必填的參數:
|
|
|
455 |
$conf["phpFileAddress"]="../stringProcess.php";#含有宣告類別的php檔案
|
|
|
456 |
$conf["fileArgu"]=__FILE__;
|
|
|
457 |
#可省略的參數:
|
|
|
458 |
#備註:該函式尚在開發中...
|
|
|
459 |
$classDiagramMaker=phpLib::classDiagramMaker($conf);
|
|
|
460 |
unset($conf);
|
|
|
461 |
|
|
|
462 |
#如果執行失敗
|
|
|
463 |
if($classDiagramMaker["status"]==="false"){
|
|
|
464 |
|
|
|
465 |
#印出結果
|
|
|
466 |
var_dump($classDiagramMaker);
|
|
|
467 |
|
|
|
468 |
#停止執行
|
|
|
469 |
exit;
|
|
|
470 |
|
|
|
471 |
}
|
|
|
472 |
|
|
|
473 |
#印出內容
|
|
|
474 |
echo $classDiagramMaker["diagramCode"];
|
|
|
475 |
|
|
|
476 |
*/
|
|
|
477 |
|
|
|
478 |
/*
|
|
|
479 |
|
|
|
480 |
#提示目前在測試的函式
|
|
|
481 |
echo "<hr>phpLib::classDiagramMaker - testCase 8<p>";
|
|
|
482 |
|
|
|
483 |
#函式說明:
|
|
|
484 |
#提供將含有類別宣告的php檔案轉成類別圖的功能
|
|
|
485 |
#回傳的內容:
|
|
|
486 |
#$result["status"],執行是否成功,"true"代表執行成功;"false"代表執行失敗。
|
|
|
487 |
#$result["error"],錯誤訊息陣列
|
|
|
488 |
#$result["diagramCode"],類別圖的網頁code
|
|
|
489 |
#必填的參數:
|
|
|
490 |
$conf["phpFileAddress"]="../webSock.php";#含有宣告類別的php檔案
|
|
|
491 |
$conf["fileArgu"]=__FILE__;
|
|
|
492 |
#可省略的參數:
|
|
|
493 |
#備註:該函式尚在開發中...
|
|
|
494 |
$classDiagramMaker=phpLib::classDiagramMaker($conf);
|
|
|
495 |
unset($conf);
|
|
|
496 |
|
|
|
497 |
#如果執行失敗
|
|
|
498 |
if($classDiagramMaker["status"]==="false"){
|
|
|
499 |
|
|
|
500 |
#印出結果
|
|
|
501 |
var_dump($classDiagramMaker);
|
|
|
502 |
|
|
|
503 |
#停止執行
|
|
|
504 |
exit;
|
|
|
505 |
|
|
|
506 |
}
|
|
|
507 |
|
|
|
508 |
#印出內容
|
|
|
509 |
echo $classDiagramMaker["diagramCode"];
|
|
|
510 |
|
|
|
511 |
*/
|
|
|
512 |
|
|
|
513 |
/*
|
|
|
514 |
|
|
|
515 |
#提示目前在測試的函式
|
|
|
516 |
echo "<hr>phpLib::classDiagramsMaker - testCase 9<p>";
|
|
|
517 |
|
|
|
518 |
#函式說明:
|
|
|
519 |
#提供將目標目錄裡的所有php檔案轉成類別圖的功能
|
|
|
520 |
#回傳的內容:
|
|
|
521 |
#$result["status"],執行是否成功,"true"代表執行成功;"false"代表執行失敗。
|
|
|
522 |
#$result["error"],錯誤訊息陣列
|
|
|
523 |
#$result["diagramCode"][$i],第$i+1個類別圖的網頁code
|
|
|
524 |
#必填的參數:
|
|
|
525 |
$conf["phpDirAddress"]="../";#含有宣告類別的php檔案目錄,""代表當前目錄。
|
|
|
526 |
$conf["fileArgu"]=__FILE__;
|
|
|
527 |
$classDiagramsMaker=phpLib::classDiagramsMaker($conf);
|
|
|
528 |
unset($conf);
|
|
|
529 |
|
|
|
530 |
#如果執行失敗
|
|
|
531 |
if($classDiagramsMaker["status"]==="false"){
|
|
|
532 |
|
|
|
533 |
#印出結果
|
|
|
534 |
var_dump($classDiagramsMaker);
|
|
|
535 |
|
|
|
536 |
#停止執行
|
|
|
537 |
exit;
|
|
|
538 |
|
|
|
539 |
}#if end
|
|
|
540 |
|
|
|
541 |
#涵式說明:
|
|
|
542 |
#將字串寫入到檔案
|
|
|
543 |
#回傳的結果:
|
|
|
544 |
#$result["status"],"true"表示檔案寫入成功,"false"表示檔案寫入失敗.
|
|
|
545 |
#$result["error"],錯誤訊息陣列.
|
|
|
546 |
#$result["function"],當前執行的函數名稱.
|
|
|
547 |
#$result["fileInfo"],實際上寫入的檔案資訊陣列.
|
|
|
548 |
#$result["fileInfo"]["createdFileName"],建立好的檔案名稱.
|
|
|
549 |
#$result["fileInfo"]["createdFilePath"],檔案建立的路徑.
|
|
|
550 |
#$result["fileInfo"]["createdFilePathAndName"].建立好的檔案名稱與路徑.
|
|
|
551 |
#必填的參數:
|
|
|
552 |
#$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑
|
|
|
553 |
$conf["fileArgu"]=__FILE__;
|
|
|
554 |
#可省略的參數:
|
|
|
555 |
#$conf["fileName"],字串,爲要編輯的檔案名稱,預設為隨機產生的檔案名稱.
|
|
|
556 |
$conf["fileName"]="phpLibT/classDiagramsMaker.html";
|
|
|
557 |
#$conf["inputString"],字串,爲要寫入到裏面的內容,若要每筆資料寫入後換行,則可以在字串內容後面加上 \r\n 即可,預設為"".
|
|
|
558 |
#$conf["inputString"]="";
|
|
|
559 |
#$conf["writeMethod"],字串,爲檔案撰寫的方式,可省略,是複寫'a'還是,重新寫入'w',預設爲'w',重新寫入.
|
|
|
560 |
#$conf["writeMethod"]="a";
|
|
|
561 |
#$conf["checkRepeat"],字串,"true"代表建立檔案之前要先檢查檔案是否存在,若存在則在原名稱後面加上從(1)開始的編號.
|
|
|
562 |
#$conf["checkRepeat"]="";
|
|
|
563 |
#$conf["filenameExtensionStartPoint"],字串,檔案的副檔名是從倒數第幾個小數點(dot)開始,預設為"1",最後一個小數點,必須與$conf["checkRepeat"]搭配才會生效.
|
|
|
564 |
#$conf["filenameExtensionStartPoint"]="";
|
|
|
565 |
#$conf["repeatNameRule"],字串,遇到相同名稱的檔案要如何加上識別的編號,編號用「\$i」表示,預設為"(\$i)",必須與$conf["checkRepeat"]搭配才會生效.
|
|
|
566 |
#$conf["repeatNameRule"]="";
|
|
|
567 |
$writeTextIntoFile=fileAccess::writeTextIntoFile($conf);
|
|
|
568 |
unset($conf);
|
|
|
569 |
|
|
|
570 |
#如果寫入檔案失敗
|
|
|
571 |
if($writeTextIntoFile["status"]==="false")
|
|
|
572 |
{
|
|
|
573 |
#印出結果
|
|
|
574 |
var_dump($writeTextIntoFile);
|
|
|
575 |
|
|
|
576 |
#停止執行
|
|
|
577 |
exit;
|
|
|
578 |
}
|
|
|
579 |
|
|
|
580 |
foreach($classDiagramsMaker["diagramCode"] as $html)
|
|
|
581 |
{
|
|
|
582 |
#涵式說明:
|
|
|
583 |
#將字串寫入到檔案
|
|
|
584 |
#回傳的結果:
|
|
|
585 |
#$result["status"],"true"表示檔案寫入成功,"false"表示檔案寫入失敗.
|
|
|
586 |
#$result["error"],錯誤訊息陣列.
|
|
|
587 |
#$result["function"],當前執行的函數名稱.
|
|
|
588 |
#$result["fileInfo"],實際上寫入的檔案資訊陣列.
|
|
|
589 |
#$result["fileInfo"]["createdFileName"],建立好的檔案名稱.
|
|
|
590 |
#$result["fileInfo"]["createdFilePath"],檔案建立的路徑.
|
|
|
591 |
#$result["fileInfo"]["createdFilePathAndName"].建立好的檔案名稱與路徑.
|
|
|
592 |
#必填的參數:
|
|
|
593 |
#$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑
|
|
|
594 |
$conf["fileArgu"]=__FILE__;
|
|
|
595 |
#可省略的參數:
|
|
|
596 |
#$conf["fileName"],字串,爲要編輯的檔案名稱,預設為隨機產生的檔案名稱.
|
|
|
597 |
$conf["fileName"]="phpLibT/classDiagramsMaker.html";
|
|
|
598 |
#$conf["inputString"],字串,爲要寫入到裏面的內容,若要每筆資料寫入後換行,則可以在字串內容後面加上 \r\n 即可,預設為"".
|
|
|
599 |
$conf["inputString"]=$html;
|
|
|
600 |
#$conf["writeMethod"],字串,爲檔案撰寫的方式,可省略,是複寫'a'還是,重新寫入'w',預設爲'w',重新寫入.
|
|
|
601 |
$conf["writeMethod"]="a";
|
|
|
602 |
#$conf["checkRepeat"],字串,"true"代表建立檔案之前要先檢查檔案是否存在,若存在則在原名稱後面加上從(1)開始的編號.
|
|
|
603 |
#$conf["checkRepeat"]="";
|
|
|
604 |
#$conf["filenameExtensionStartPoint"],字串,檔案的副檔名是從倒數第幾個小數點(dot)開始,預設為"1",最後一個小數點,必須與$conf["checkRepeat"]搭配才會生效.
|
|
|
605 |
#$conf["filenameExtensionStartPoint"]="";
|
|
|
606 |
#$conf["repeatNameRule"],字串,遇到相同名稱的檔案要如何加上識別的編號,編號用「\$i」表示,預設為"(\$i)",必須與$conf["checkRepeat"]搭配才會生效.
|
|
|
607 |
#$conf["repeatNameRule"]="";
|
|
|
608 |
$writeTextIntoFile=fileAccess::writeTextIntoFile($conf);
|
|
|
609 |
unset($conf);
|
|
|
610 |
|
|
|
611 |
#如果寫入檔案失敗
|
|
|
612 |
if($writeTextIntoFile["status"]==="false")
|
|
|
613 |
{
|
|
|
614 |
#印出結果
|
|
|
615 |
var_dump($writeTextIntoFile);
|
|
|
616 |
|
|
|
617 |
#停止執行
|
|
|
618 |
exit;
|
|
|
619 |
}
|
|
|
620 |
}
|
|
|
621 |
|
|
|
622 |
*/
|
|
|
623 |
|
|
|
624 |
?>
|