Subversion Repositories qbpwcf-lib(archive)

Rev

Rev 664 | Rev 666 | 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) 2015~2024 Min-Jhin,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/>.

*/
namespace qbpwcf;

/*
類別說明:
提供類似cronjob服務的類別.
備註:
無.
*/
class autoService{
        
        /*
        #函式說明:
        #當前類別被呼叫的靜態方法不存在時,將會執行該函數,回報該方法不存在.
        #回傳結果:
        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
        #$reuslt["error"],執行不正常結束的錯訊息陣列.
        #$result["function"],當前執行的函式名稱.
        #必填參數:
        #$method,物件,為物件實體或類別名稱,會自動置入該參數.
        #$arguments,陣列,為呼叫方法時所用的參數.
        #參考資料:
        #__call=>http://php.net/manual/en/language.oop5.overloading.php#object.callstatic
        */
        public function __call($method,$arguments){
                
                #取得當前執行的函式
                $result["function"]=__FUNCTION__;
                
                #設置執行不正常
                $result["status"]="false";
                
                #設置執行錯誤
                $result["error"][]=__NAMESPACE__ ."/".$method."() 不存在!";
                
                #設置所丟入的參數
                $result["error"][]=$arguments;
                
                #回傳結果
                return $result;
                
                }#function __call end
                
        /*
        #函式說明:
        #當前類別被呼叫的靜態方法不存在時,將會執行該函數,回報該方法不存在.
        #回傳結果:
        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
        #$reuslt["error"],執行不正常結束的錯訊息陣列.
        #$result["function"],當前執行的函式名稱.
        #必填參數:
        #$method,物件,為物件實體或類別名稱,會自動置入該參數.
        #$arguments,陣列,為呼叫方法時所用的參數.
        #參考資料:
        #__call=>http://php.net/manual/en/language.oop5.overloading.php#object.callstatic
        */
        public static function __callStatic($method,$arguments){
                
                #取得當前執行的函式
                $result["function"]=__FUNCTION__;
                
                #設置執行不正常
                $result["status"]="false";
                
                #設置執行錯誤
                $result["error"][]="欲呼叫的". __NAMESPACE__ ."/".$method."() 不存在!";
                
                #設置所丟入的參數
                $result["error"][]=$arguments;
                
                #回傳結果
                return $result;
                
                }#function __callStatic end
        
        /*
        #函式說明:
        #新增或覆蓋系統上有哪些要自動執行的工作.
        #回傳結果:
        #$result["ststus"],執行是否正常,"true"代表執行正常,"false"代表執行不正常.
        #$result["error"],錯誤訊息陣列.
        #$result["function"],當前執行的函式名稱.
        #$result["content"],當前排程資訊內容.
        #$result["argu"],使用的參數.
        #必填參數:
        #$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑
        $conf["fileArgu"]=__FILE__;
        #$conf["actions"],字串陣列,每個元素代表要執行的事情,每個事情為要執行的指令與參數所組成的一維陣列.
        $conf["actions"]=array();
        #$conf["times"],字串陣列,每個元素代表要執行事情的時間點,單為為秒.格式為UTC時區的「年年年年-月月-日日 時 時:分分:秒秒」格式,事情不存在於啟動的狀態且當前時間大於等於之就會執行.
        $conf["times"]=array();
        #$conf["repeat"],字串陣列,每個元素為一維陣列,代表要執行事情的重複方式.key為"times"代表剩下幾次可以執行,其value為"N"代表剩下N次(若N等於-1,則代表無限重複執行;若N等於0,則代表不用執行);key為"after"代表下次執行的時間為times+加其value;key為"fixed"代表下次執行的時間為一個循環的固定時間點,value為每次循環的固定時間點,例如每天01:05則為1h*3600s+5m*60s=3900,小於一天(86400秒)的時間,因此周期為天.
        $conf["repeat"]=array();
        #可省略參數:
        #$conf["config"],字串,排程的設定檔位置,預設為"/usr/local/etc/qbpwcf-schedule.conf.php".
        #$conf["config"]="";
        #$conf["uuids"],字串陣列,每個排程的uuid,若不指定則會自動產生,若跟既有action的uuid相同,則會覆蓋其相關資訊.
        #$conf["uuids"]=array();
        #參考資料:
        #無.
        #備註:
        #建構中
        */
        public static function createList(&$conf){
        
                #初始化要回傳的變數
                $result=array();

                #初始化當前執行的函數名稱
                $result["function"]=__FUNCTION__;

                #如果 $conf 不為陣列
                if(gettype($conf)!="array"){
                        
                        #設置執行失敗
                        $result["status"]="false";
                        
                        #設置執行錯誤訊息
                        $result["error"][]="\$conf變數須為陣列形態";

                        #如果傳入的參數為 null
                        if($conf==null){
                                
                                #設置執行錯誤訊息
                                $result["error"][]="\$conf變數不得為null,請檢查函數「".$result["function"]."」的參數設置有無正確!";
                                
                                }#if end

                        #回傳結果
                        return $result;
                        
                        }#if end
        
                #取得使用的參數
                $result["argu"]=$conf;
                
                #函式說明:
                #檢查必填與可省略的參數,可省略參數可指定預設要給與什麼數值內容.
                #回傳結果:
                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                #$result["error"],執行不正常結束的錯訊息陣列.
                #$result["simpleError"],簡單表示的錯誤訊息.
                #$result["function"],當前執行的函式名稱.
                #$result["argu"],設置給予的參數.
                #$result["passed"],識別要檢查的全體變數是否存在以及型態是否正確的變數,"true"代表檢查全部通過;"false"代表檢查不通過
                #$result[$shouldBeCheckedVarName]["varExist"],所檢查的變數是否存在,"false"代表不存在;"true"代表存在
                #$result[$shouldBeCheckedVarName]["varType"],所檢查的變數型態是否正確,"false"代表錯誤;"true"代表正確
                #$result[$shouldBeCheckedVarName]["error"],每個參數設定的錯誤訊息
                #$result["shouldNotBeEmpty"],不應該為空字串或控陣列的變數.
                #$result["argu"],字串陣列,目前輸入的參數名稱陣列.
                #$result["legalVarName"],字串陣列,合法可用的參數名稱陣列.
                #$result["notNeedVar"],字串陣列,多餘的參數名稱.
                #必填參數:
                #$conf["varInput"],陣列變數,要檢查的陣列變數,請在要檢查的參數前面加上&,這樣變動的結果才能被套用。
                $conf["variableCheck::checkArguments"]["varInput"]=&$conf;
                #$conf["referenceVarKey"],字串,$conf參數後面的key值,用於移除不要的參考陣列.
                $conf["variableCheck::checkArguments"]["referenceVarKey"]="variableCheck::checkArguments";
                #可省略參數:
                #$conf["mustBeFilledVariableName"],爲必填參數的變數名稱陣列,形態爲陣列變數,元素數量需要跟"mustBeFilledVariableType"參數的元素數量一致,例如: $conf["mustBeFilledVariableName"] = array("id","account","password");
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableName"]=array("fileArgu","actions","times","repeat");
                #$conf["mustBeFilledVariableType"],爲必填參數的變數陣列應該爲何種變數形態,形態爲陣列,元素數量需要跟"mustBeFilledVariableName"參數的元素數量一致,例如: $conf["mustBeFilledVariableType"] = array("string",integer,"double","resource","object"); , null代表不指定變數形態.
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableType"]=array("string","array","array","array");
                #$conf["canBeEmptyString"],字串,必填變數內容如果是空字串就不能算是有設置的話,請設為"false",預設爲"true",可以為空字串.
                $conf["variableCheck::checkArguments"]["canBeEmptyString"]="false";
                #$conf["canNotBeEmpty"],字串陣列,哪些必填參數的內容不得為空字串或空陣列,僅當$conf["canBeEmptyString"]為"true"時會生效.
                #$conf["canNotBeEmpty"]=array();
                #$conf["canBeEmpty"],字串陣列,哪些必填參數的內容可為空字串或空陣列,僅當$conf["canBeEmptyString"]為"false"時會生效.
                #$conf["canBeEmpty"]=array();
                #$conf["skipableVariableCanNotBeEmpty"],字串陣列,哪些可省略參數不可以為空字串或空陣列.
                $conf["variableCheck::checkArguments"]["skipableVariableCanNotBeEmpty"]=array("config");
                #$conf["skipableVariableName"],陣列字串,爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableName"] = array("id","account","password");
                $conf["variableCheck::checkArguments"]["skipableVariableName"]=array("config","uuids");
                #$conf["skipableVariableType"],陣列字串,爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableType"] = array("string",integer,"double");
                $conf["variableCheck::checkArguments"]["skipableVariableType"]=array("string","array");
                #$conf["skipableVarDefaultValue"],字串陣列,每個不存在的可省略變數要初始化為什麼,null與代表不指定,若預設值是參數之一,請將$conf["mustBeFilledVar"]改成"\$conf["\mustBeFilledVar\"]".
                $conf["variableCheck::checkArguments"]["skipableVarDefaultValue"]=array("/usr/local/etc/qbpwcf-schedule.conf.php",null);
                #$conf["disallowAllSkipableVarIsEmpty"],字串,是否允許每個可省略參數都為空字串,預設為"true"允許,反之為"false".
                #$conf["disallowAllSkipableVarIsEmpty"]="";
                #$conf["disallowAllSkipableVarIsEmptyArray"],字串,是否允許每個可省略參數都為空陣列,預設為"true"允許,反之為"false".
                #$conf["disallowAllSkipableVarIsEmptyArray"]="";
                #$conf["disallowAllSkipableVarNotExist"],字串,是否不允許每個可省略參數都不存在,預設為"false"代表允許,反之為"true".
                #$conf["disallowAllSkipableVarNotExist"]="";
                #$conf["arrayCountEqualCheck"],字串陣列,為檢查哪些陣列參數的元素數量要一樣,$conf["arrayCountEqualCheck"][$i]=array()為第$i組key為哪些的變數其元素數量要相等.
                $conf["variableCheck::checkArguments"]["arrayCountEqualCheck"][]=array("actions","times","repeat");
                #參考資料:
                #array_keys=>http://php.net/manual/en/function.array-keys.php
                #備註:
                #無.
                $checkArguments=variableCheck::checkArguments($conf["variableCheck::checkArguments"]);
                unset($conf["variableCheck::checkArguments"]);
        
                #如果 $checkArguments["status"] 等於 "false"
                if($checkArguments["status"]==="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkArguments;
                        
                        #回傳結果
                        return $result;                         
                        
                        }#if end
                        
                #如果 $checkArguments["passed"] 等於 "false"
                if($checkArguments["passed"]==="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkArguments;
                        
                        #回傳結果
                        return $result;
                        
                        }#if end
                
                #檢查每個 time 的格式
                foreach($conf["times"] as $time){
                
                        #函式說明:
                        #檢查字串是否符合 RFC 3339/ISO-8601 格式
                        #回傳結果:
                        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                        #$result["passed"],檢查是否通過,"true"代表通過,"false"代表不通過.
                        #$result["argu"],使用的參數.
                        #$result["function"],當前執行的函數.
                        #$result["error"],涵式錯誤訊息陣列.
                        #必填參數:
                        #$conf["input"],字串,要檢查格式的字串.
                        $conf["variableCheck::checkRFC3339"]["input"]=$time;
                        #可省略參數:
                        #$conf["UTC"],字串,是否要用當前時區的設定去換算成unixtime,預設為"true",代表要;反之為"false".
                        #$conf["variableCheck::checkRFC3339"]["UTC"]="false";
                        #參考資料:
                        #ISO 8601-2:2019=>https://www.rfc-editor.org/info/rfc3339
                        #rfc3339=>https://www.rfc-editor.org/rfc/rfc3339
                        #備註:
                        #無.
                        $checkRFC3339=variableCheck::checkRFC3339($conf["variableCheck::checkRFC3339"]);
                        unset($conf["variableCheck::checkRFC3339"]);
                
                        #如果執行出錯
                        if($checkRFC3339["status"]==="false"){
                                
                                #設置錯誤識別
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$checkRFC3339;
                                
                                #回傳結果
                                return $result;
                                
                                }#if end
                
                        #如果檢查不通過
                        if($checkRFC3339["passed"]==="false"){
                                
                                #設置錯誤識別
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$checkRFC3339;
                                
                                #回傳結果
                                return $result;
                                
                                }#if end
                
                        }#foreach end
                
                #取得uuid的數量應該要多少
                $uuidCount=count($conf["actions"]);
                        
                #如果沒有指定 uuids
                if(!isset($conf["uuids"])){
                
                        #初始化 uuids
                        $conf["uuids"]=array();
                
                        #產生對應數量的uuid
                        for($i=0;$i<$uuidCount;$i++){
                        
                                #函式說明:
                                #使用 linux 的 uuid 指令來產生 uuid 字串
                                #回傳結果:
                                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                                #$result["error"],錯誤訊息.
                                #$result["function"],當前執行的函式名稱.
                                #必填參數:
                                #無.
                                #可省略參數:
                                #無.
                                #參考資料:
                                #無.
                                #備註:
                                #無.
                                $uuid=cmd::uuid();
                        
                                #如果執行失敗
                                if($uuid["status"]==="false"){
                                        
                                        #設置錯誤識別
                                        $result["status"]="false";
                                        
                                        #設置錯誤訊息
                                        $result["error"]=$uuid;
                                        
                                        #回傳結果
                                        return $result; 
                                        
                                        }#if end
                                
                                #儲存新的uuid
                                $conf["uuids"][]=$uuid["content"];
                                
                                }#for end
                
                        }#if end
                
                #讀取既有排程設定檔
                #函式說明:
                #依據行號分隔抓取檔案的內容,結果會回傳一個陣列
                #回傳的變數說明:
                #$result["status"],執行是否成功,"true"代表成功;"fasle"代表失敗.
                #$result["error"],錯誤訊息提示.
                #$result["warning"],警告訊息.
                #$result["function"],當前執行的函數名稱.
                #$result["fileContent"],爲檔案的內容陣列.
                #$result["lineCount"],爲檔案內容總共的行數.
                #$result["fullContent"],為檔案的完整內容.
                #$result["base64data"],為檔案的base64內容.
                #$result["mimeType"],為檔案的mime type.
                #必填參數:
                #$conf["filePositionAndName"],字串,爲檔案的位置以及名稱.
                $conf["fileAccess::getFileContent"]["filePositionAndName"]=$conf["config"];
                #$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑
                $conf["fileAccess::getFileContent"]["fileArgu"]=$conf["fileArgu"];
                #可省略參數:
                #$conf["web"],是要取得網路上的檔案則為"true";反之預設為"false".
                #$conf["web"]="true";
                #$conf["createIfnotExist"],字串,預設為"false"代表檔案不存在也不需要建立;反之為"true".
                $conf["fileAccess::getFileContent"]["createIfnotExist"]="true";
                #參考資料:
                #file(),取得檔案內容的行數.
                #file=>http:#php.net/manual/en/function.file.php
                #rtrim(),剔除透過file()取得每行內容結尾的換行符號.
                #filesize=>http://php.net/manual/en/function.filesize.php
                #參考資料:
                #無.
                #備註:
                #無.
                $getFileContent=fileAccess::getFileContent($conf["fileAccess::getFileContent"]);
                unset($conf["fileAccess::getFileContent"]);
                
                #如果執行失敗
                if($getFileContent["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$getFileContent;
                        
                        #回傳結果
                        return $result; 
                        
                        }#if end
                
                #初始化原始設定擋內容
                $oriConfig=array();
                
                #針對每行內容
                foreach($getFileContent["fileContent"] as $lineNo=>$line){
                
                        #解析內容
                        #函式說明:
                        #加密字串,可以用的方法有sha1,md5,password_sha,sha1可以回傳20或40的數值字串,md5可以回傳32個數值字串,password_hash可以回傳60~255個字元.
                        #回傳結果:
                        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常. 
                        #$result["function"],當前執行的函數名稱.
                        #$result["content"],加密後的結果.
                        #$result["error"],錯誤訊息陣列.
                        #$result["argu"],使用的參數.
                        #必填參數:
                        #$conf["enCodeStr"],"字串",要加密的字串.
                        $conf["authenticate::enCodeStr"]["enCodeStr"]=$line;
                        #$conf["enCodeType"],"字串",加密的類型,有"sha1"與"md5"與"p_hash"與"aes256"與"qbpwcf"5種,"sha1"較耗時,"md5"較快,"p_hash"適用於密碼加密,"aes256"是對稱式加解密,"qbpwcf"是透過urlenocde、json_encode、base64_encode的結果.
                        $conf["authenticate::enCodeStr"]["enCodeType"]="qbpwcf";
                        #可省略參數:
                        #$conf["sha1Raw"],字串,sha1加密的結果要用20個0與1組合還是要用40位數的16進位數值,"true"代表前者,"false"代表後者,預設為"false".
                        #$conf["sha1Raw"]="false";
                        #$conf["p_hash"],字串,p_hash加密過後的字串,該參數若存在且$conf["enCodeType"]為"p_hash",則代表是要檢查$conf["enCodeStr"]是否為符合$conf["p_hash"]的密碼.
                        #$conf["p_hash"]="";
                        #$conf["keyForAes256"],字串,用來 AES256 加解密的金鑰.
                        #$conf["keyForAes256"]="";
                        #$conf["aes256Encode"],字串,"true"代表是要加密,"false"代表是要解密.
                        #$conf["aes256Encode"]="";
                        #$conf["qbpwcfDecode"],字串,若"enCodeType"為"qbpwcf",則預設為"false",代表加密;反之為"true",代表解密.
                        $conf["authenticate::enCodeStr"]["qbpwcfDecode"]="true";
                        #參考資料:
                        #sha1=>http://php.net/manual/en/function.sha1.php
                        #md5=>http://php.net/manual/en/function.md5.php
                        #password_hash=>http://php.net/manual/en/function.password-hash.php
                        #password_verify=>http://php.net/manual/en/function.password-verify.php
                        #json_decode=>https://www.php.net/manual/en/function.json-decode.php
                        #備註:
                        #無.
                        $enCodeStr=authenticate::enCodeStr($conf["authenticate::enCodeStr"]);
                        unset($conf["authenticate::enCodeStr"]);
                
                        #如果執行失敗
                        if($enCodeStr["status"]==="false"){
                                
                                #設置錯誤識別
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$enCodeStr;
                                
                                #回傳結果
                                return $result; 
                                
                                }#if end
                        
                        #解碼後的內容
                        $oriConfig[]=$enCodeStr["content"];
                
                        }#foreach end
                
                #針對每個要新增的排程
                foreach($conf["actions"] as $index => $action){
                
                        #針對每個既有的排程
                        foreach($oriConfig as $indexFor_oriConfig => $oCfg){
                        
                                #針對既有排程的uuid
                                $ouuid=$oCfg->uuid;
                        
                                #函式說明:
                                #檢查一個數值是否與陣列裏面的元素相同,找到一個相符合的元素後就會停止搜尋.
                                #回傳結果:
                                #$result["status"],"true"表示執行正確,"false"表示執行錯誤.
                                #$result["founded"],"true"表示有找到相同的,"false"表示沒有找到相同的.
                                #$result["error"],錯誤訊息
                                #$result["function"],當前執行的函數名稱
                                #$result["argv"],使用的參數
                                #$result["equalVarName"],相等的變數名稱或key.
                                #$result["equalVarValue"],相等的變數數值內容.
                                #必填參數:
                                #$conf["conditionElement"],字串,條件元素,要等於的元素內容.
                                $conf["search::getEqualVar"]["conditionElement"]=$ouuid;
                                #$conf["compareElements"],字串陣列,要比對的陣列變數內容.
                                $conf["search::getEqualVar"]["compareElements"]=$conf["uuids"];
                                #可省略參數:
                                #無.
                                #參考資料:
                                #無.
                                #備註:
                                #無.
                                $getEqualVar=search::getEqualVar($conf["search::getEqualVar"]);
                                unset($conf["search::getEqualVar"]);
                        
                                #如果執行失敗
                                if($getEqualVar["status"]==="false"){
                                        
                                        #設置錯誤識別
                                        $result["status"]="false";
                                        
                                        #設置錯誤訊息
                                        $result["error"]=$getEqualVar;
                                        
                                        #回傳結果
                                        return $result; 
                                        
                                        }#if end
                                        
                                #如果有找到相同uuid
                                if($getEqualVar["founded"]==="true"){
                                        
                                        #移除舊排程
                                        unset($oriConfig[$indexFor_oriConfig]);
                                        
                                        #換看下個新排程的uuid
                                        break;
                                        
                                        }#if end
                        
                                }#foreach end
                
                        }#foreach end
                
                #初始化儲存未加密的排程資訊
                $rawScheduleInfo=$oriConfig;
                
                #將剩下的每個舊排程
                foreach($oriConfig as $index => $config){
                
                        #加密內容
                        #函式說明:
                        #加密字串,可以用的方法有sha1,md5,password_sha,sha1可以回傳20或40的數值字串,md5可以回傳32個數值字串,password_hash可以回傳60~255個字元.
                        #回傳結果:
                        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常. 
                        #$result["function"],當前執行的函數名稱.
                        #$result["content"],加密後的結果.
                        #$result["error"],錯誤訊息陣列.
                        #$result["argu"],使用的參數.
                        #必填參數:
                        #$conf["enCodeStr"],"字串",要加密的字串.
                        $conf["authenticate::enCodeStr"]["enCodeStr"]=$config;
                        #$conf["enCodeType"],"字串",加密的類型,有"sha1"與"md5"與"p_hash"與"aes256"與"qbpwcf"5種,"sha1"較耗時,"md5"較快,"p_hash"適用於密碼加密,"aes256"是對稱式加解密,"qbpwcf"是透過urlenocde、json_encode、base64_encode的結果.
                        $conf["authenticate::enCodeStr"]["enCodeType"]="qbpwcf";
                        #可省略參數:
                        #$conf["sha1Raw"],字串,sha1加密的結果要用20個0與1組合還是要用40位數的16進位數值,"true"代表前者,"false"代表後者,預設為"false".
                        #$conf["sha1Raw"]="false";
                        #$conf["p_hash"],字串,p_hash加密過後的字串,該參數若存在且$conf["enCodeType"]為"p_hash",則代表是要檢查$conf["enCodeStr"]是否為符合$conf["p_hash"]的密碼.
                        #$conf["p_hash"]="";
                        #$conf["keyForAes256"],字串,用來 AES256 加解密的金鑰.
                        #$conf["keyForAes256"]="";
                        #$conf["aes256Encode"],字串,"true"代表是要加密,"false"代表是要解密.
                        #$conf["aes256Encode"]="";
                        #$conf["qbpwcfDecode"],字串,若"enCodeType"為"qbpwcf",則預設為"false",代表加密;反之為"true",代表解密.
                        #$conf["authenticate::enCodeStr"]["qbpwcfDecode"]="true";
                        #參考資料:
                        #sha1=>http://php.net/manual/en/function.sha1.php
                        #md5=>http://php.net/manual/en/function.md5.php
                        #password_hash=>http://php.net/manual/en/function.password-hash.php
                        #password_verify=>http://php.net/manual/en/function.password-verify.php
                        #json_decode=>https://www.php.net/manual/en/function.json-decode.php
                        #備註:
                        #無.
                        $enCodeStr=authenticate::enCodeStr($conf["authenticate::enCodeStr"]);
                        unset($conf["authenticate::enCodeStr"]);
                
                        #如果執行失敗
                        if($enCodeStr["status"]==="false"){
                                
                                #設置錯誤識別
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$enCodeStr;
                                
                                #回傳結果
                                return $result; 
                                
                                }#if end
                
                        #取得加密後的內容
                        $newConfig[]=$enCodeStr["content"];
                
                        }#foreach end
                
                #針對每個要新增的排程
                foreach($conf["actions"] as $index => $action){
                                
                        #取得該uuid
                        $uuid=$conf["uuids"][$index];
                        
                        #取得該time
                        $time=$conf["times"][$index];
                        
                        #函式說明:
                        #計算時間點距離1970/01/01多少秒,亦即unixtime.
                        #回傳結果:
                        #$result["stauts"],執行是否成功,"true"代表執行成功;"false"代表執行失敗.
                        #$result["error"],錯誤訊息陣列.
                        #$result["content"],時間點距離1970/01/01的多少秒.
                        #$result["argu"],使用的參數.
                        #$result["unixtime"],執行本函式時的unixtime.
                        #$result["oriDateAndTime"],原始輸入的內容,若replace0參數為"true",才會有該回傳內容.
                        #必填參數:
                        #$conf["dateAndTime"],字串,格式爲 2011-05-27 23:59:59.
                        $conf["time::caculateTimeAmount"]["dateAndTime"]=$time;
                        #可省略參數:
                        #$conf["UTC"],字串,是否要用當前時區的設定去換算成unixtime,預設為"false",代表不要;反之為"true".
                        $conf["time::caculateTimeAmount"]["UTC"]="true";
                        #$conf["replace0"],字串,是否要將連續為0的內容替換成當下時間,預設為"true"代表要;反之為"false".
                        #$conf["replace0"]="true";
                        #參考資料:
                        #無.
                        #備註:
                        #無.
                        $caculateTimeAmount=time::caculateTimeAmount($conf["time::caculateTimeAmount"]);
                        unset($conf["time::caculateTimeAmount"]);
                        
                        #如果執行失敗
                        if($caculateTimeAmount["status"]==="false"){
                                
                                #設置錯誤識別
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$caculateTimeAmount;
                                
                                #回傳結果
                                return $result; 
                                
                                }#if end
                        
                        #轉換成unixtime
                        $time=$caculateTimeAmount["content"];
                        
                        #取代該repeat
                        $repeat=$conf["repeat"][$index];
                        
                        #如果有指定固定時間執行
                        if(isset($repeat["fixed"])){
                        
                                #函式說明:
                                #計算時間點距離1970/01/01多少秒,亦即unixtime.
                                #回傳結果:
                                #$result["stauts"],執行是否成功,"true"代表執行成功;"false"代表執行失敗.
                                #$result["error"],錯誤訊息陣列.
                                #$result["content"],時間點距離1970/01/01的多少秒.
                                #$result["argu"],使用的參數.
                                #$result["oriDateAndTime"],原始輸入的內容,若replace0參數為"true",才會有該回傳內容.
                                #必填參數:
                                #$conf["dateAndTime"],字串,格式爲 2011-05-27 23:59:59.
                                $conf["time::caculateTimeAmount"]["dateAndTime"]=$repeat["fixed"];
                                #可省略參數:
                                #$conf["UTC"],字串,是否要用當前時區的設定去換算成unixtime,預設為"false",代表不要;反之為"true".
                                $conf["time::caculateTimeAmount"]["UTC"]="true";
                                #$conf["replace0"],字串,是否要將連續為0的內容替換成當下時間,預設為"true"代表要;反之為"false".
                                #$conf["replace0"]="true";
                                #參考資料:
                                #無.
                                #備註:
                                #無.
                                $caculateTimeAmount=time::caculateTimeAmount($conf["time::caculateTimeAmount"]);
                                unset($conf["time::caculateTimeAmount"]);
                                
                                #如果執行失敗
                                if($caculateTimeAmount["status"]==="false"){
                                        
                                        #設置錯誤識別
                                        $result["status"]="false";
                                        
                                        #設置錯誤訊息
                                        $result["error"]=$caculateTimeAmount;
                                        
                                        #回傳結果
                                        return $result; 
                                        
                                        }#if end
                        
                                #更新時間為unixtime
                                $repeat["fixed"]=$caculateTimeAmount["content"];
                                
                                }#if end
                        
                        #取得新增/覆蓋排程設定時的unixtime
                        $lastUpdateUnixTime=$caculateTimeAmount["unixtime"];
                        
                        #要加密的排程資訊,uuid(排程的識別碼),time(預計要執行俄時間),repeat(重複的方式),update(新增/覆蓋排程設定時的unixtime)
                        $scheduleInfo=array("uuid"=>$uuid,"action"=>$action,"time"=>$time,"repeat"=>$repeat,"update"=>$lastUpdateUnixTime);
                        
                        #儲存未加密的排程資訊
                        $rawScheduleInfo[]=$scheduleInfo;
                        
                        #加密內容
                        #函式說明:
                        #加密字串,可以用的方法有sha1,md5,password_sha,sha1可以回傳20或40的數值字串,md5可以回傳32個數值字串,password_hash可以回傳60~255個字元.
                        #回傳結果:
                        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常. 
                        #$result["function"],當前執行的函數名稱.
                        #$result["content"],加密後的結果.
                        #$result["error"],錯誤訊息陣列.
                        #$result["argu"],使用的參數.
                        #必填參數:
                        #$conf["enCodeStr"],"字串",要加密的字串.
                        $conf["authenticate::enCodeStr"]["enCodeStr"]=$scheduleInfo;
                        #$conf["enCodeType"],"字串",加密的類型,有"sha1"與"md5"與"p_hash"與"aes256"與"qbpwcf"5種,"sha1"較耗時,"md5"較快,"p_hash"適用於密碼加密,"aes256"是對稱式加解密,"qbpwcf"是透過urlenocde、json_encode、base64_encode的結果.
                        $conf["authenticate::enCodeStr"]["enCodeType"]="qbpwcf";
                        #可省略參數:
                        #$conf["sha1Raw"],字串,sha1加密的結果要用20個0與1組合還是要用40位數的16進位數值,"true"代表前者,"false"代表後者,預設為"false".
                        #$conf["sha1Raw"]="false";
                        #$conf["p_hash"],字串,p_hash加密過後的字串,該參數若存在且$conf["enCodeType"]為"p_hash",則代表是要檢查$conf["enCodeStr"]是否為符合$conf["p_hash"]的密碼.
                        #$conf["p_hash"]="";
                        #$conf["keyForAes256"],字串,用來 AES256 加解密的金鑰.
                        #$conf["keyForAes256"]="";
                        #$conf["aes256Encode"],字串,"true"代表是要加密,"false"代表是要解密.
                        #$conf["aes256Encode"]="";
                        #$conf["qbpwcfDecode"],字串,若"enCodeType"為"qbpwcf",則預設為"false",代表加密;反之為"true",代表解密.
                        #$conf["authenticate::enCodeStr"]["qbpwcfDecode"]="true";
                        #參考資料:
                        #sha1=>http://php.net/manual/en/function.sha1.php
                        #md5=>http://php.net/manual/en/function.md5.php
                        #password_hash=>http://php.net/manual/en/function.password-hash.php
                        #password_verify=>http://php.net/manual/en/function.password-verify.php
                        #json_decode=>https://www.php.net/manual/en/function.json-decode.php
                        #備註:
                        #無.
                        $enCodeStr=authenticate::enCodeStr($conf["authenticate::enCodeStr"]);
                        unset($conf["authenticate::enCodeStr"]);
                
                        #如果執行失敗
                        if($enCodeStr["status"]==="false"){
                                
                                #設置錯誤識別
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$enCodeStr;
                                
                                #回傳結果
                                return $result; 
                                
                                }#if end
                        
                        #取得加密後的內容
                        $newConfig[]=$enCodeStr["content"];
                                
                        }#foreach end           
                
                #更新排程設定檔 
                #函式說明:
                #將多行字串寫入到檔案
                #回傳結果:
                #$result["status"],"true"表示檔案寫入成功,"false"表示檔案寫入失敗.
                #$result["error"],錯誤訊息陣列.
                #$result["function"],當前執行函數的名稱.
                #必填參數:
                #$conf["fileName"],字串,爲要編輯的檔案名稱
                $conf["fileAccess::writeMultiLine"]["fileName"]=$conf["config"];
                #$conf["inputString"],字串陣列,爲要寫入到 $conf["fileName"] 裏面的內容. $conf["inputString"][$i] 代表第 $i+1 行。
                $conf["fileAccess::writeMultiLine"]["inputString"]=$newConfig;
                #$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑
                $conf["fileAccess::writeMultiLine"]["fileArgu"]=$conf["fileArgu"];
                #可省略參數:
                #$conf["writeMethod"]="a";#爲檔案撰寫的方式,可省略,是複寫'a'還是,重新寫入'w',預設爲'w',重新寫入。
                #$conf["fileAccess::writeMultiLine"]["writeMethod"]="a";
                #參考資料:
                #無.
                #備註:
                #無.
                $writeMultiLine=fileAccess::writeMultiLine($conf["fileAccess::writeMultiLine"]);
                unset($conf["fileAccess::writeMultiLine"]);
                
                #如果執行失敗
                if($writeMultiLine["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$writeMultiLine;
                        
                        #回傳結果
                        return $result;                         
                        
                        }#if end
                
                #設置當前排程結果資訊
                $result["content"]=$rawScheduleInfo;
                        
                #設置執行正常
                $result["status"]="true";
        
                return $result;
        
                }#function createList end
        
        /*
        #函式說明:
        #查詢系統上有哪些要自動執行的工作檔案
        #回傳結果:
        #$result["ststus"],執行是否正常,"true"代表執行正常,"false"代表執行不正常.
        #$result["error"],錯誤訊息陣列.
        #$result["content"],回傳的結果,要執行的工作資訊陣列,每個元素的key有"uuid"跟"cmd&argu",前者為用於執行完畢時回報的排程項目識別;後者為該排程事項的指令與參數.
        #$result["function"],當前執行的函式名稱.
        #$result["found"],識別是否有要執行的動作.
        #必填參數:
        #$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑
        $conf["fileArgu"]=__FILE__;
        #可省略參數:
        #$conf["config"],字串,排程的設定檔位置,預設為"/usr/local/etc/qbpwcf-schedule.conf.php".
        #$conf["config"]="";
        #可省略參數:
        #無.
        #參考資料:
        #無.
        #備註:
        #建構中
        */
        public static function checkList(&$conf){
                
                #初始化要回傳的變數
                $result=array();

                #初始化當前執行的函數名稱
                $result["function"]=__FUNCTION__;

                #如果 $conf 不為陣列
                if(gettype($conf)!="array"){
                        
                        #設置執行失敗
                        $result["status"]="false";
                        
                        #設置執行錯誤訊息
                        $result["error"][]="\$conf變數須為陣列形態";

                        #如果傳入的參數為 null
                        if($conf==null){
                                
                                #設置執行錯誤訊息
                                $result["error"][]="\$conf變數不得為null,請檢查函數「".$result["function"]."」的參數設置有無正確!";
                                
                                }#if end

                        #回傳結果
                        return $result;
                        
                        }#if end
        
                #取得使用的參數
                $result["argu"]=$conf;

                #檢查參數
                #函式說明:
                #檢查必填與可省略的參數,可省略參數可指定預設要給與什麼數值內容。
                #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
                #$reuslt["error"],執行不正常結束的錯訊息陣列.
                #$result["function"],當前執行的函式名稱.
                #$result["passed"],識別要檢查的全體變數是否存在以及型態是否正確的變數,"true"代表檢查全部通過;"false"代表檢查不通過
                #$result[$shouldBtCheckedVarName]["varExist"],所檢查的變數是否存在,"false"代表不存在;"true"代表存在
                #$result[$shouldBtCheckedVarName]["varType"],所檢查的變數型態是否正確,"false"代表錯誤;"true"代表正確
                #$result[$shouldBtCheckedVarName]["error"],每個參數設定的錯誤訊息
                #$result["argu"],字串陣列,目前輸入的參數名稱陣列.
                #$result["legalVarName"],字串陣列,合法可用的參數名稱陣列.
                #$result["notNeedVar"],字串陣列,多餘的參數名稱.
                #必填寫的參數:
                #$conf["variableCheck::checkArguments"]["varInput"],陣列變數,要檢查的陣列變數,請在要檢查的參數前面加上&,這樣變動的結果才能被套用。
                $conf["variableCheck::checkArguments"]["varInput"]=&$conf;
                #$conf["variableCheck::checkArguments"]["mustBeFilledVariableName"],爲必填參數的變數名稱陣列,形態爲陣列變數,例如: $conf["mustBeFilledVariableName"] = array("id","account","password");
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableName"]=array("fileArgu");
                #$conf["variableCheck::checkArguments"]["mustBeFilledVariableType"],爲必填參數的變數陣列應該爲何種變數形態,形態爲陣列 例如: $conf["mustBeFilledVariableType"] = array("string",integer,"double"); 
                $conf["variableCheck::checkArguments"]["mustBeFilledVariableType"]=array("string");
                #$conf["variableCheck::checkArguments"]["referenceVarKey"],字串,$conf參數後面的key值,用於移除不要的參考陣列.
                $conf["variableCheck::checkArguments"]["referenceVarKey"]="variableCheck::checkArguments";
                #可以省略的參數:
                #$conf["variableCheck::checkArguments"]["canBeEmptyString"],必填變數內容如果是空字串就不能算是有設置的話,請設為"false",預設爲"true"。
                $conf["variableCheck::checkArguments"]["canBeEmptyString"]="false";
                #$conf["variableCheck::checkArguments"]["skipableVariableName"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableName"] = array("id","account","password");
                $conf["variableCheck::checkArguments"]["skipableVariableName"]=array("config");
                #$conf["variableCheck::checkArguments"]["skipableVariableType"],爲可省略參數的變數名稱陣列,形態爲陣列變數,例如: $conf["skipableVariableType"] = array("string",integer,"double"); 
                $conf["variableCheck::checkArguments"]["skipableVariableType"]=array("string");
                #$conf["variableCheck::checkArguments"]["skipableVarDefaultValue"],字串陣列,每個不存在的可省略變數要初始化為什麼,null與代表不指定,若預設值是必填參數之一,請將$conf["mustBeFilledVar"]改成"\$conf["\mustBeFilledVar\"]".
                $conf["variableCheck::checkArguments"]["skipableVarDefaultValue"]=array("/usr/local/etc/qbpwcf-schedule.conf.php");
                #$conf["arrayCountEqualCheck"],字串陣列,為檢查哪些陣列參數的元素數量要一樣,$conf["arrayCountEqualCheck"][$i]=array()為第$i組key為哪些的變數其元素數量要相等.
                #$conf["arrayCountEqualCheck"][]=array();
                #參考資料來源:
                #array_keys=>http://php.net/manual/en/function.array-keys.php
                $checkArguments=variableCheck::checkArguments($conf["variableCheck::checkArguments"]);
                unset($conf["variableCheck::checkArguments"]);

                #如果 $checkArguments["status"] 等於 "false"
                if($checkArguments["status"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkArguments;
                        
                        #回傳結果
                        return $result;                         
                        
                        }#if end
                        
                #如果 $checkArguments["passed"] 等於 "false"
                if($checkArguments["passed"]=="false"){
                        
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$checkArguments;
                        
                        #回傳結果
                        return $result;                         
                        
                        }#if end
                                
                #函式說明:
                #依據行號分隔抓取檔案的內容,結果會回傳一個陣列
                #回傳的變數說明:
                #$result["status"],執行是否成功,"true"代表成功;"fasle"代表失敗.
                #$result["error"],錯誤訊息提示.
                #$result["warning"],警告訊息.
                #$result["function"],當前執行的函數名稱.
                #$result["fileContent"],爲檔案的內容陣列.
                #$result["lineCount"],爲檔案內容總共的行數.
                #$result["fullContent"],為檔案的完整內容.
                #$result["base64data"],為檔案的base64內容.
                #$result["mimeType"],為檔案的mime type.
                #必填的參數:
                #$conf["filePositionAndName"],字串,爲檔案的位置以及名稱.
                $conf["fileAccess::getFileContent"]["filePositionAndName"]=$conf["config"];
                #$conf["fileArgu"],字串,php變數__FILE__的內容,亦即該檔案在檔案系統的絕對路徑
                $conf["fileAccess::getFileContent"]["fileArgu"]=$conf["fileArgu"];
                #可省略參數:
                #$conf["web"],是要取得網路上的檔案則為"true";反之則為"false".
                $conf["fileAccess::getFileContent"]["web"]="false";
                #參考資料:
                #file(),取得檔案內容的行數.
                #file=>http:#php.net/manual/en/function.file.php
                #rtrim(),剔除透過file()取得每行內容結尾的換行符號.
                #filesize=>http://php.net/manual/en/function.filesize.php
                $getFileContent=fileAccess::getFileContent($conf["fileAccess::getFileContent"]);
                unset($conf["fileAccess::getFileContent"]);
                
                #如果取得檔案失敗
                if($getFileContent["status"]==="false"){
                
                        #設置錯誤識別
                        $result["status"]="false";
                        
                        #設置錯誤訊息
                        $result["error"]=$getFileContent;
                        
                        #回傳結果
                        return $result; 
                
                        }#if end
                        
                #解析檔案內容
                
                #針對每行內容
                foreach($getFileContent["fileContent"] as $line){
                
                        #加密內容
                        #函式說明:
                        #加密字串,可以用的方法有sha1,md5,password_sha,sha1可以回傳20或40的數值字串,md5可以回傳32個數值字串,password_hash可以回傳60~255個字元.
                        #回傳結果:
                        #$result["status"],執行是否正常,"true"代表正常,"false"代表不正常. 
                        #$result["function"],當前執行的函數名稱.
                        #$result["content"],加密後的結果.
                        #$result["error"],錯誤訊息陣列.
                        #$result["argu"],使用的參數.
                        #必填參數:
                        #$conf["enCodeStr"],"字串",要加密的字串.
                        $conf["authenticate::enCodeStr"]["enCodeStr"]=$line;
                        #$conf["enCodeType"],"字串",加密的類型,有"sha1"與"md5"與"p_hash"與"aes256"與"qbpwcf"5種,"sha1"較耗時,"md5"較快,"p_hash"適用於密碼加密,"aes256"是對稱式加解密,"qbpwcf"是透過urlenocde、json_encode、base64_encode的結果.
                        $conf["authenticate::enCodeStr"]["enCodeType"]="qbpwcf";
                        #可省略參數:
                        #$conf["sha1Raw"],字串,sha1加密的結果要用20個0與1組合還是要用40位數的16進位數值,"true"代表前者,"false"代表後者,預設為"false".
                        #$conf["sha1Raw"]="false";
                        #$conf["p_hash"],字串,p_hash加密過後的字串,該參數若存在且$conf["enCodeType"]為"p_hash",則代表是要檢查$conf["enCodeStr"]是否為符合$conf["p_hash"]的密碼.
                        #$conf["p_hash"]="";
                        #$conf["keyForAes256"],字串,用來 AES256 加解密的金鑰.
                        #$conf["keyForAes256"]="";
                        #$conf["aes256Encode"],字串,"true"代表是要加密,"false"代表是要解密.
                        #$conf["aes256Encode"]="";
                        #$conf["qbpwcfDecode"],字串,若"enCodeType"為"qbpwcf",則預設為"false",代表加密;反之為"true",代表解密.
                        $conf["authenticate::enCodeStr"]["qbpwcfDecode"]="true";
                        #參考資料:
                        #sha1=>http://php.net/manual/en/function.sha1.php
                        #md5=>http://php.net/manual/en/function.md5.php
                        #password_hash=>http://php.net/manual/en/function.password-hash.php
                        #password_verify=>http://php.net/manual/en/function.password-verify.php
                        #json_decode=>https://www.php.net/manual/en/function.json-decode.php
                        #備註:
                        #無.
                        $enCodeStr=authenticate::enCodeStr($conf["authenticate::enCodeStr"]);
                        unset($conf["authenticate::enCodeStr"]);
                
                        #如果執行失敗失敗
                        if($enCodeStr["status"]==="false"){
                        
                                #設置錯誤識別
                                $result["status"]="false";
                                
                                #設置錯誤訊息
                                $result["error"]=$enCodeStr;
                                
                                #回傳結果
                                return $result; 
                        
                                }#if end
                
                        #取得解密後的內容
                        $line=$enCodeStr["content"];
                                        
                        #如果內容沒有 uuid
                        if(!isset($line->uuid)){
                        
                                #忽略該行
                                continue;
                        
                                }#if end
                                
                        #取得排程的uuid
                        $actionUuid=&$line->uuid;       
                
                        #如果內容沒有 time ,亦即排程設定的(預期/已)執行時間
                        if(!isset($line->time)){
                        
                                #忽略該行
                                continue;
                        
                                }#if end
                                
                        #取得排程的時間
                        $actionUnixTime=&$line->time;   
                                
                        #如果內容沒有 action ,亦即排程設定的指令與參數.
                        if(!isset($line->action)){
                        
                                #忽略該行
                                continue;
                        
                                }#if end
                                
                        #取得排程要做的事情資訊
                        $actionInfo=&$line->action;
                                
                        #如果內容沒有 repeat ,亦即排程設定的執行模式.
                        if(!isset($line->repeat)){
                        
                                #忽略該行
                                continue;
                        
                                }#if end
                                
                        #如果內容沒有 repeat->time ,亦即排程設定的剩下重複次數.
                        if(!isset($line->repeat->times)){
                        
                                #忽略該行
                                continue;
                        
                                }#if end
                                
                        #取得剩下的重複執行次數
                        $leftRepeatTimes=&$line->repeat->times;
                                
                        #如果內容沒有 repeat->after(亦即排程設定的重複條件為time的之後多久) 跟 repeat->time->fixed(亦即排程設定的重複條件為用update mask過後的指定時間). 
                        if( !isset($line->repeat->after) && !isset($line->repeat->fixed) ){
                        
                                #忽略該行
                                continue;
                        
                                }#if end
                                
                        #如果內容沒有 update,亦即排程設定最後更新的時間
                        if(!isset($line->update)){
                        
                                #忽略該行
                                continue;
                        
                                }#if end
                        
                        #取得當下時間
                        $currenUnixTime=time::unix();
                        
                        #如果當前時間大於等於排程的時間
                        if($currenUnixTime>=$actionUnixTime){
                        
                                #如果剩下的次數為0
                                if((int)$leftRepeatTimes===0){
                                
                                        #跳過不執行
                                        continue;
                                
                                        }#if end
                        
                                #初始化要執行的事情資訊
                                $jobInfo=array();
                                
                                #設置其uuid
                                $jobInfo["uuid"]=$actionUuid;
                                
                                #設置其指令與參數
                                $jobInfo["cmd&argu"]=$actionInfo;
                        
                                #儲存工作資訊
                                $result["content"][]=$jobInfo;
                        
                                }#if end
                
                        }#foreach end
                
                #預設置沒有事情要執行
                $result["found"]="false";
                
                #如果有要執行的事情
                if(isset($conf["content"])){
                
                        #設置有事情要執行
                        $result["found"]="true";
                
                        }#if end
                
                #設置執行正常
                $result["status"]="true";
                
                #回傳結果
                return $result;
                
                }#function checkList end
        
        /*
        
        */
        public static function daemon(&$conf){
        
                }#function daemon end
        
        }#class autoService end

?>