当前位置: 首页>>代码示例>>PHP>>正文


PHP Process::load方法代码示例

本文整理汇总了PHP中Process::load方法的典型用法代码示例。如果您正苦于以下问题:PHP Process::load方法的具体用法?PHP Process::load怎么用?PHP Process::load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Process的用法示例。


在下文中一共展示了Process::load方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: create

    public function create($data)
    {
        try {
            parent::create($data);
        } catch (\Exception $e) {
            throw new \RuntimeException(sprintf("Can't create Bpmn Project." . PHP_EOL . $e->getMessage()));
        }

        try {
            $wpData = array();
            $wpData["PRO_UID"] = $this->getUid();

            if (array_key_exists("PRJ_NAME", $data)) {
                $wpData["PRO_TITLE"] = $data["PRJ_NAME"];
            }
            if (array_key_exists("PRJ_DESCRIPTION", $data)) {
                $wpData["PRO_DESCRIPTION"] = $data["PRJ_DESCRIPTION"];
            }
            if (array_key_exists("PRJ_AUTHOR", $data)) {
                $wpData["PRO_CREATE_USER"] = $data["PRJ_AUTHOR"];
            }

            $this->wp = new Project\Workflow();
            $this->wp->create($wpData);

            //Add Audit Log
            $ogetProcess = new \Process();
            $getprocess=$ogetProcess->load($this->getUid());
            $nameProcess=$getprocess['PRO_TITLE'];
            \G::auditLog("ImportProcess", 'PMX File Imported '.$nameProcess. ' ('.$this->getUid().')');

        } catch (\Exception $e) {
            $prjUid = $this->getUid();
            //$this->remove();
            $bpmnProject = Project\Bpmn::load($prjUid);
            $bpmnProject->remove();

            throw new \RuntimeException(sprintf(
                "Can't create Bpmn Project with prj_uid: %s, workflow creation fails." . PHP_EOL . $e->getMessage()
                , $prjUid
            ));
        }
    }
开发者ID:rrsc,项目名称:processmaker,代码行数:43,代码来源:BpmnWorkflow.php

示例2: create

 public function create($data)
 {
     try {
         parent::create($data);
     } catch (\Exception $e) {
         throw new \RuntimeException(sprintf("Can't create Workflow Project." . PHP_EOL . $e->getMessage()));
     }
     try {
         $bpData = array();
         $bpData["PRJ_UID"] = $this->getUid();
         if (array_key_exists("PRO_TITLE", $data)) {
             $bpData["PRJ_NAME"] = $data["PRO_TITLE"];
         }
         if (array_key_exists("PRO_DESCRIPTION", $data)) {
             $bpData["PRJ_DESCRIPTION"] = $data["PRO_DESCRIPTION"];
         }
         if (array_key_exists("PRO_CREATE_USER", $data)) {
             $bpData["PRJ_AUTHOR"] = $data["PRO_CREATE_USER"];
         } elseif (array_key_exists("USR_UID", $data)) {
             $bpData["PRJ_AUTHOR"] = $data["USR_UID"];
         }
         $this->bp = new Project\Bpmn();
         $this->bp->create($bpData);
         // At this time we will add a default diagram and process
         $this->bp->addDiagram();
         $this->bp->addProcess();
         //Add Audit Log
         $ogetProcess = new \Process();
         $getprocess = $ogetProcess->load($this->getUid());
         $nameProcess = $getprocess['PRO_TITLE'];
         \G::auditLog("ImportProcess", 'BPMN Imported ' . $nameProcess . ' (' . $this->getUid() . ')');
     } catch (\Exception $e) {
         $prjUid = $this->getUid();
         $this->remove();
         throw new \RuntimeException(sprintf("Can't create Project with prj_uid: %s, workflow creation fails." . PHP_EOL . $e->getMessage(), $prjUid));
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:37,代码来源:WorkflowBpmn.php

示例3: Process

    //#20
    $t->like($e->getMessage(), "%The process cannot be created. The USR_UID is empty.%", 'create() return The process cannot be created. The USR_UID is empty.');
}
//create
try {
    $Fields['USR_UID'] = '1';
    // we need a valid user
    $obj = new Process();
    $proUid = $obj->create($Fields);
    //#21
    $t->isa_ok($proUid, 'string', 'create(), creates a new Process');
    //#22
    //$t->is ( strlen($proUid),      14,   'create(), creates a new Process, Guid lenth=14 chars' );
    $t->diag("strlen({$proUid}),      14,   'create(), creates a new Process, Guid lenth=14 chars' ");
    $t->is(strlen($proUid), 32, 'create(), creates a new Process, Guid lenth=32 chars');
    $res = $obj->load($proUid);
    //#23
    $t->isa_ok($res, 'array', 'load(), loads a new Process');
    //#24
    $t->is($res['PRO_UID'], $proUid, 'load(), loads a new Process, valid PRO_UID');
    //#25
    $t->is(strlen($res['PRO_CREATE_DATE']), 19, 'load(), loads a new Process, valid CREATE_DATE');
    //#26
    $t->like($res['PRO_TITLE'], '%Default Process%', 'load(), loads a new Process, valid PRO_TITLE');
    //#27
    $t->is($res['PRO_DESCRIPTION'], 'Default Process Description', 'load(), loads a new Process, valid PRO_DESCRIPTION');
} catch (Exception $e) {
    $t->like($e->getMessage(), "%Unable to execute INSERT statement%", 'create() return Error in getAppTitle, the APP_UID cant be blank');
}
//update with empty
try {
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:classProcessTest.php

示例4: Task

                 $tasksAffected .= 'From -> ' . $titleTask . ' : ' . $aData['TASK'] . ' To End Of Process Condition -> ' . $aFields['ROU_CONDITION'] . ' ; ';
             }
         } else {
             $oTaskSaveNextPattern = new Task();
             $taskNextInfo = $oTaskSaveNextPattern->load($aRow['ROU_NEXT_TASK']);
             $titleNextTask = $taskNextInfo['TAS_TITLE'];
             if ($aRow['ROU_CONDITION'] == '') {
                 $tasksAffected .= 'From -> ' . $titleTask . ' : ' . $aData['TASK'] . ' To -> ' . $titleNextTask . ' : ' . $aRow['ROU_NEXT_TASK'] . ' Condition -> Empty ; ';
             } else {
                 $tasksAffected .= 'From -> ' . $titleTask . ' : ' . $aData['TASK'] . ' To -> ' . $titleNextTask . ' : ' . $aRow['ROU_NEXT_TASK'] . ' Condition -> ' . $aFields['ROU_CONDITION'] . ' ; ';
             }
         }
         unset($aFields);
     }
     $oProcessNewPattern = new Process();
     $processInfo = $oProcessNewPattern->load($aData['PROCESS']);
     $titleProcess = $processInfo['PRO_TITLE'];
     G::auditLog("DerivationRule", 'PROCESS NAME : ' . $titleProcess . ' : ' . $aData['PROCESS'] . ' Change Routing Rule From : ' . $aData['ROU_TYPE'] . ' Details : ROU_TYPE_OLD -> ' . $aData['ROU_TYPE_OLD'] . ' ROU_TYPE ->' . $aData['ROU_TYPE'] . ' ' . $tasksAffected);
     break;
 case 'DISCRIMINATOR':
     //Girish ->Added to save changes, while editing the route
     foreach ($aData['GRID_DISCRIMINATOR_TYPE'] as $iKey => $aRow) {
         $aFields['PRO_UID'] = $aData['PROCESS'];
         $aFields['TAS_UID'] = $aData['TASK'];
         $aFields['ROU_NEXT_TASK'] = $aRow['ROU_NEXT_TASK'];
         $aFields['ROU_CASE'] = $iKey;
         $aFields['ROU_TYPE'] = $aData['ROU_TYPE'];
         $aFields['ROU_CONDITION'] = $aRow['ROU_CONDITION'];
         $aFields['ROU_OPTIONAL'] = $aRow['ROU_OPTIONAL'];
         $routeData = $oTasks->getRouteByType($aData['PROCESS'], $aRow['ROU_NEXT_TASK'], $aData['ROU_TYPE']);
         foreach ($routeData as $route) {
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:patterns_Ajax.php

示例5: switch

}
try {
    global $RBAC;
    switch ($RBAC->userCanAccess('PM_FACTORY')) {
        case -2:
            G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
            G::header('location: ../login/login');
            die;
            break;
        case -1:
            G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
            G::header('location: ../login/login');
            die;
            break;
    }
    require_once 'classes/model/CaseTrackerObject.php';
    $oCaseTrackerObject = new CaseTrackerObject();
    if (isset($_POST['form'])) {
        $value = $_POST['form'];
    } else {
        $value = $_POST;
    }
    $aFields = $oCaseTrackerObject->load($value['CTO_UID']);
    $aFields['CTO_CONDITION'] = $value['CTO_CONDITION'];
    $oCaseTrackerObject->update($aFields);
    $infoProcess = new Process();
    $resultProcess = $infoProcess->load($value['PRO_UID']);
    G::auditLog('CaseTrackers', 'Save Condition Case Tracker Object (' . $value['CTO_UID'] . ', condition: ' . $value['CTO_CONDITION'] . ') in Process "' . $resultProcess['PRO_TITLE'] . '"');
} catch (Exception $oException) {
    die($oException->getMessage());
}
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:tracker_ConditionsSave.php

示例6: getDatasetCasesByProcess

 function getDatasetCasesByProcess()
 {
     $dataSet = new XYDataSet();
     $processObj = new Process();
     $c = new Criteria('workflow');
     $c->clearSelectColumns();
     $c->addSelectColumn(ApplicationPeer::PRO_UID);
     $c->addSelectColumn('COUNT(*) AS CANT');
     //$c->addJoin( ProcessPeer::PRO_UID, ProcessPeer::PRO_UID, Criteria::LEFT_JOIN);
     $c->addGroupByColumn(ApplicationPeer::PRO_UID);
     $rs = ApplicationPeer::doSelectRS($c);
     $rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $rs->next();
     $row = $rs->getRow();
     while (is_array($row)) {
         $processObj->load($row['PRO_UID']);
         $label = $processObj->getProTitle();
         $value = $row['CANT'];
         $dataSet->addPoint(new Point($label, (int) $value));
         $rs->next();
         $row = $rs->getRow();
     }
     return $dataSet;
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:24,代码来源:class.charts.php

示例7: getByProTitle

 public static function getByProTitle($proTitle)
 {
     $oCriteria = new Criteria("workflow");
     $oCriteria->addSelectColumn(ContentPeer::CON_ID);
     $oCriteria->add(ContentPeer::CON_CATEGORY, 'PRO_TITLE');
     $oCriteria->add(ContentPeer::CON_LANG, SYS_LANG);
     $oCriteria->add(ContentPeer::CON_VALUE, $proTitle);
     $oDataset = ContentPeer::doSelectRS($oCriteria, Propel::getDbConnection('workflow_ro'));
     $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $oDataset->next();
     $aRow = $oDataset->getRow();
     $oProcess = new Process();
     return isset($aRow["CON_ID"]) ? $oProcess->load($aRow["CON_ID"]) : null;
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:14,代码来源:Process.php

示例8: Task

 $oTask = new Task();
 $TaskFields = $oTask->load($sTASKS);
 $WE_EVN_UID = $oTask->getStartingEvent($sTASKS);
 if ($TaskFields['TAS_ASSIGN_TYPE'] != 'BALANCED') {
     throw new Exception("The task '" . $TaskFields['TAS_TITLE'] . "' doesn't have a valid assignment type. The task needs to have a 'Cyclical Assignment'.");
 }
 G::LoadClass('tasks');
 $oTask = new Tasks();
 $user = $oTask->assignUsertoTask($sTASKS);
 if ($user == 0) {
     throw new Exception(G::LoadTranslation('ID_TASK') . "'" . $TaskFields['TAS_TITLE'] . "'" . G::LoadTranslation('ID_NOT_HAVE_USERS'));
 }
 $http = G::is_https() ? "https://" : "http://";
 $sContent = '';
 $infoProcess = new Process();
 $resultProcess = $infoProcess->load($sPRO_UID);
 if ($withWS) {
     //creating sys.info;
     $SITE_PUBLIC_PATH = '';
     if (file_exists($SITE_PUBLIC_PATH . '')) {
     }
     //creating the first file
     require_once 'classes/model/Dynaform.php';
     $oDynaform = new Dynaform();
     $aDynaform = $oDynaform->load($sDYNAFORM);
     $dynTitle = str_replace(' ', '_', str_replace('/', '_', $aDynaform['DYN_TITLE']));
     $sContent = "<?php\n";
     $sContent .= "global \$_DBArray;\n";
     $sContent .= "if (!isset(\$_DBArray)) {\n";
     $sContent .= "  \$_DBArray = array();\n";
     $sContent .= "}\n";
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:processes_webEntryGenerate.php

示例9: getSummary

 /**
  * get the case summary data
  *
  * @param string $httpData->appUid
  * @param string $httpData->delIndex
  * @return array containg the case summary data
  */
 function getSummary($httpData)
 {
     $labels = array();
     $form = new Form('cases/cases_Resume', PATH_XMLFORM, SYS_LANG);
     G::LoadClass('case');
     $case = new Cases();
     foreach ($form->fields as $fieldName => $field) {
         $labels[$fieldName] = $field->label;
     }
     if (isset($_SESSION['_applicationFields']) && $_SESSION['_processData']) {
         $applicationFields = $_SESSION['_applicationFields'];
         unset($_SESSION['_applicationFields']);
         $processData = $_SESSION['_processData'];
         unset($_SESSION['_processData']);
     } else {
         if ($httpData->action == 'sent') {
             // Get the last valid delegation for participated list
             $criteria = new Criteria();
             $criteria->addSelectColumn(AppDelegationPeer::DEL_INDEX);
             $criteria->add(AppDelegationPeer::APP_UID, $httpData->appUid);
             $criteria->add(AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL);
             $criteria->addDescendingOrderByColumn(AppDelegationPeer::DEL_INDEX);
             if (AppDelegationPeer::doCount($criteria) > 0) {
                 $dataset = AppDelegationPeer::doSelectRS($criteria);
                 $dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
                 $dataset->next();
                 $row = $dataset->getRow();
                 $httpData->delIndex = $row['DEL_INDEX'];
             }
         }
         $applicationFields = $case->loadCase($httpData->appUid, $httpData->delIndex);
         $process = new Process();
         $processData = $process->load($applicationFields['PRO_UID']);
     }
     $data = array();
     $task = new Task();
     $taskData = $task->load($applicationFields['TAS_UID']);
     $currentUser = $applicationFields['CURRENT_USER'] != '' ? $applicationFields['CURRENT_USER'] : '[' . G::LoadTranslation('ID_UNASSIGNED') . ']';
     $data[] = array('label' => $labels['PRO_TITLE'], 'value' => $processData['PRO_TITLE'], 'section' => $labels['TITLE1']);
     $data[] = array('label' => $labels['TITLE'], 'value' => $applicationFields['TITLE'], 'section' => $labels['TITLE1']);
     $data[] = array('label' => $labels['APP_NUMBER'], 'value' => $applicationFields['APP_NUMBER'], 'section' => $labels['TITLE1']);
     $data[] = array('label' => $labels['STATUS'], 'value' => $applicationFields['STATUS'], 'section' => $labels['TITLE1']);
     $data[] = array('label' => $labels['APP_UID'], 'value' => $applicationFields['APP_UID'], 'section' => $labels['TITLE1']);
     $data[] = array('label' => $labels['CREATOR'], 'value' => $applicationFields['CREATOR'], 'section' => $labels['TITLE1']);
     $data[] = array('label' => $labels['CREATE_DATE'], 'value' => $applicationFields['CREATE_DATE'], 'section' => $labels['TITLE1']);
     $data[] = array('label' => $labels['UPDATE_DATE'], 'value' => $applicationFields['UPDATE_DATE'], 'section' => $labels['TITLE1']);
     $data[] = array('label' => $labels['DESCRIPTION'], 'value' => $applicationFields['DESCRIPTION'], 'section' => $labels['TITLE1']);
     // note added by krlos pacha carlos[at]colosa[dot]com
     //getting this field if it doesn't exist. Related 7994 bug
     $taskData['TAS_TITLE'] = array_key_exists('TAS_TITLE', $taskData) ? $taskData['TAS_TITLE'] : Content::Load("TAS_TITLE", "", $applicationFields['TAS_UID'], SYS_LANG);
     $data[] = array('label' => $labels['TAS_TITLE'], 'value' => $taskData['TAS_TITLE'], 'section' => $labels['TITLE2']);
     $data[] = array('label' => $labels['CURRENT_USER'], 'value' => $currentUser, 'section' => $labels['TITLE2']);
     $data[] = array('label' => $labels['DEL_DELEGATE_DATE'], 'value' => $applicationFields['DEL_DELEGATE_DATE'], 'section' => $labels['TITLE2']);
     $data[] = array('label' => $labels['DEL_INIT_DATE'], 'value' => $applicationFields['DEL_INIT_DATE'], 'section' => $labels['TITLE2']);
     $data[] = array('label' => $labels['DEL_TASK_DUE_DATE'], 'value' => $applicationFields['DEL_TASK_DUE_DATE'], 'section' => $labels['TITLE2']);
     $data[] = array('label' => $labels['DEL_FINISH_DATE'], 'value' => $applicationFields['DEL_FINISH_DATE'], 'section' => $labels['TITLE2']);
     //$data[] = array('label'=>$labels['DYN_UID'] ,           'value' => $processData['PRO_DYNAFORMS']['PROCESS'];, 'section'=>$labels['DYN_UID']);
     return $data;
 }
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:66,代码来源:appProxy.php

示例10: Process

 * Copyright (C) 2004 - 2008 Colosa Inc.23
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program 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 Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
 * Coral Gables, FL, 33134, USA, or email info@colosa.com.
 *
 */
if (($RBAC_Response = $RBAC->userCanAccess("PM_FACTORY")) != 1) {
    return $RBAC_Response;
}
require_once 'classes/model/Triggers.php';
require_once 'classes/model/Process.php';
$sProcessUID = $_GET['PRO_UID'];
$oProcess = new Process();
$aFields = $oProcess->load($sProcessUID);
$_SESSION['PROCESS'] = $sProcessUID;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('view', 'triggers/triggersTree');
G::RenderPage('publish', 'raw');
开发者ID:nshong,项目名称:processmaker,代码行数:31,代码来源:triggersTree.php

示例11: Process

        }
        //replacing the processOwner user for the current user
        $oData->process['PRO_CREATE_USER'] = $_SESSION['USER_LOGGED'];
        //!respect of the groups
        if ($result->ExistProcessInDatabase == 0 && $result->ExistGroupsInDatabase == 0) {
            if ($processFileType == "pm") {
                $oProcess->createProcessFromData($oData, $path . $filename);
            }
        }
        //!data ouput
        $result->sNewProUid = $sProUid;
        $result->proFileName = $Fields['PRO_FILENAME'];
        //Add Audit Log
        $process = new Process();
        if ($process->processExists($sProUid)) {
            $arrayProcessData = $process->load($oData->process["PRO_UID"]);
            G::auditLog("ImportProcess", "PM File Imported " . $arrayProcessData["PRO_TITLE"] . " (" . $arrayProcessData["PRO_UID"] . ")");
        }
    } catch (Exception $e) {
        $result->response = $e->getMessage();
        $result->catchMessage = $e->getMessage();
        $result->success = true;
    }
}
if ($action == "uploadFileNewProcessExist") {
    try {
        $option = $_REQUEST["IMPORT_OPTION"];
        $filename = $_REQUEST["PRO_FILENAME"];
        $processFileType = $_REQUEST["processFileType"];
        $result->ExistGroupsInDatabase = "";
        //"" -Default
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:processes_Import_Ajax.php

示例12: Process

  leimnud.Package.Load("processmap",{Type:"file",Absolute:true,Path:"/jscore/processmap/core/processmap.js"});

  leimnud.exec(leimnud.fix.memoryLeak);

  ' );



require_once 'classes/model/Process.php';



$objProc = new Process();

$aProc = $objProc->load( $Fields['PRO_UID'] );

$Fields['PRO_TITLE'] = $aProc['PRO_TITLE'];







$objTask = new Task();

$aTask = $objTask->load( $Fields['TAS_UID'] );

$Fields['TAS_TITLE'] = $aTask['TAS_TITLE'];
开发者ID:rrsc,项目名称:processmaker,代码行数:29,代码来源:cases_Resume.php

示例13: Process




        //!data ouput

        $result->sNewProUid = $sProUid;

        $result->proFileName = $Fields['PRO_FILENAME'];



        //Add Audit Log

        $ogetProcess = new Process();

        $getprocess=$ogetProcess->load($oData->process['PRO_UID']);

        $nameProcess=$getprocess['PRO_TITLE'];

        G::auditLog("ImportProcess", 'PM File Imported '.$nameProcess. ' ('.$oData->process['PRO_UID'].')');



    } catch (Exception $e) {

        $result->response = $e->getMessage();

        $result->catchMessage = $e->getMessage();

        $result->success = true;
开发者ID:rrsc,项目名称:processmaker,代码行数:27,代码来源:processes_Import_Ajax.php

示例14: getProcessInformation

 public function getProcessInformation()
 {
     $process = new Process();
     $processData = $process->load($_SESSION['PROCESS']);
     require_once 'classes/model/Users.php';
     $user = new Users();
     try {
         $userData = $user->load($processData['PRO_CREATE_USER']);
         $processData['PRO_AUTHOR'] = $userData['USR_FIRSTNAME'] . ' ' . $userData['USR_LASTNAME'];
     } catch (Exception $oError) {
         $processData['PRO_AUTHOR'] = '(USER DELETED)';
     }
     $processData['PRO_CREATE_DATE'] = date('F j, Y', strtotime($processData['PRO_CREATE_DATE']));
     print G::json_encode($processData);
 }
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:15,代码来源:ajaxListener.php

示例15: PROPFIND

 /**
  * PROPFIND method handler
  *
  * @param array general parameter passing array
  * @param array return array for file properties
  * @return bool true on success
  */
 function PROPFIND(&$options, &$files)
 {
     $paths = $this->paths;
     // prepare property array
     $files["files"] = array();
     $pathClasses = PATH_DB . PATH_SEP . SYS_SYS . PATH_SEP . 'classes' . PATH_SEP;
     if (count($paths) == 0 && is_dir($pathClasses)) {
         $props = array();
         $props[] = $this->mkprop("displayname", 'Classes');
         $props[] = $this->mkprop("creationdate", filectime($pathClasses));
         $props[] = $this->mkprop("getlastmodified", filemtime($pathClasses));
         $props[] = $this->mkprop("lastaccessed", filemtime($pathClasses));
         $props[] = $this->mkprop("resourcetype", 'collection');
         $props[] = $this->mkprop("getcontenttype", 'httpd/unix-directory');
         $files["files"][] = array('path' => 'classes', 'props' => $props);
     }
     if (count($paths) > 0 && $paths[0] == 'classes' && is_dir($pathClasses)) {
         // try to open directory
         $handle = @opendir($pathClasses);
         if ($handle) {
             while ($filename = readdir($handle)) {
                 $ext = array_pop(explode('.', $filename));
                 if ($filename != "." && $filename != ".." && !is_dir($pathClasses . $filename) && $ext == 'php') {
                     $props = array();
                     $props[] = $this->mkprop("displayname", $filename);
                     $props[] = $this->mkprop("creationdate", filectime($pathClasses . $filename));
                     $props[] = $this->mkprop("getlastmodified", filemtime($pathClasses . $filename));
                     $props[] = $this->mkprop("getetag", fileatime($pathClasses . $filename));
                     $props[] = $this->mkprop("lastaccessed", filemtime($pathClasses . $filename));
                     $props[] = $this->mkprop("resourcetype", '');
                     $props[] = $this->mkprop("getcontenttype", 'text/plain');
                     $props[] = $this->mkprop("getcontentlength", filesize($pathClasses . $filename));
                     if (count($paths) == 1 || count($paths) == 2 && $paths[1] == $filename) {
                         $files["files"][] = array('path' => "classes/{$filename}", 'props' => $props);
                     }
                 }
             }
         }
     }
     //path classes
     $pathProcesses = PATH_DB . SYS_SYS . PATH_SEP;
     if (count($paths) == 0 && is_dir($pathProcesses)) {
         $props = array();
         $props[] = $this->mkprop("displayname", 'Processes');
         $props[] = $this->mkprop("creationdate", filectime($pathProcesses));
         $props[] = $this->mkprop("getlastmodified", filemtime($pathProcesses));
         $props[] = $this->mkprop("resourcetype", 'collection');
         $props[] = $this->mkprop("getcontenttype", 'httpd/unix-directory');
         $files["files"][] = array('path' => 'processes', 'props' => $props);
     }
     //list all active processes
     if (count($paths) == 1 && $paths[0] == 'processes' && is_dir($pathProcesses)) {
         // try to get the process directory list
         G::LoadClass('processMap');
         G::LoadClass('model/Process');
         $oProcessMap = new processMap();
         $oProcess = new Process();
         $c = $oProcessMap->getConditionProcessList();
         $oDataset = ProcessPeer::doSelectRS($c);
         $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $oDataset->next();
         while ($aRow = $oDataset->getRow()) {
             if ($aRow['PRO_STATUS'] == 'ACTIVE') {
                 $aProcess = $oProcess->load($aRow['PRO_UID']);
                 $props = array();
                 $props[] = $this->mkprop("displayname", $aProcess['PRO_TITLE']);
                 $props[] = $this->mkprop("creationdate", filectime($pathProcesses));
                 $props[] = $this->mkprop("getlastmodified", filemtime($pathProcesses));
                 $props[] = $this->mkprop("lastaccessed", filemtime($pathProcesses));
                 $props[] = $this->mkprop("resourcetype", 'collection');
                 $props[] = $this->mkprop("getcontenttype", 'httpd/unix-directory');
                 $files["files"][] = array('path' => "processes/" . $aRow['PRO_UID'], 'props' => $props);
             }
             $oDataset->next();
         }
     }
     //dir of processes
     //content of any process  ( the three major folders of Processes )
     $pathXmlform = $pathProcesses . 'xmlForms' . PATH_SEP;
     if (count($paths) == 2 && $paths[0] == 'processes' && is_dir($pathProcesses)) {
         $props = array();
         $props[] = $this->mkprop("displayname", 'xmlforms');
         $props[] = $this->mkprop("creationdate", filectime($pathXmlform));
         $props[] = $this->mkprop("getlastmodified", filemtime($pathXmlform));
         $props[] = $this->mkprop("lastaccessed", filemtime($pathXmlform));
         $props[] = $this->mkprop("resourcetype", 'collection');
         $props[] = $this->mkprop("getcontenttype", 'httpd/unix-directory');
         $files["files"][] = array('path' => 'processes/' . $paths[1] . '/xmlforms', 'props' => $props);
         $props[] = $this->mkprop("displayname", 'mailTemplates');
         $props[] = $this->mkprop("creationdate", filectime($pathProcesses));
         $props[] = $this->mkprop("getlastmodified", filemtime($pathProcesses));
         $props[] = $this->mkprop("lastaccessed", filemtime($pathProcesses));
         $props[] = $this->mkprop("resourcetype", 'collection');
//.........这里部分代码省略.........
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:101,代码来源:class.webdav.php


注:本文中的Process::load方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。