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


PHP G::LoadClass方法代码示例

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


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

示例1: postNote

function postNote($httpData)
{
    //extract(getExtJSParams());
    $appUid = isset($httpData->appUid) ? $httpData->appUid : '';
    $usrUid = isset($httpData->usrUid) ? $httpData->usrUid : '';
    require_once "classes/model/AppNotes.php";
    $appNotes = new AppNotes();
    $noteContent = addslashes($httpData->noteText);
    $result = $appNotes->postNewNote($appUid, $usrUid, $noteContent, false);
    //return true;
    //die();
    //send the response to client
    @ini_set('implicit_flush', 1);
    ob_start();
    //echo G::json_encode($result);
    @ob_flush();
    @flush();
    @ob_end_flush();
    ob_implicit_flush(1);
    //return true;
    //send notification in background
    $noteRecipientsList = array();
    G::LoadClass('case');
    $oCase = new Cases();
    $p = $oCase->getUsersParticipatedInCase($appUid);
    foreach ($p['array'] as $key => $userParticipated) {
        $noteRecipientsList[] = $key;
    }
    $noteRecipients = implode(",", $noteRecipientsList);
    $appNotes->sendNoteNotification($appUid, $usrUid, $noteContent, $noteRecipients);
}
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:class.actionsByEmailUtils.php

示例2: saveInputDoc

 public function saveInputDoc($params)
 {
     require_once 'classes/model/InputDocument.php';
     G::LoadClass('processMap');
     $aData = array();
     $aData['PRO_UID'] = $params->PRO_UID;
     $aData['INP_DOC_UID'] = $params->INP_DOC_UID;
     $aData['INP_DOC_TITLE'] = $params->INP_DOC_TITLE;
     $aData['INP_DOC_FORM_NEEDED'] = $params->INP_DOC_FORM_NEEDED;
     if ($aData['INP_DOC_FORM_NEEDED'] != 'VIRTUAL') {
         $aData['INP_DOC_ORIGINAL'] = $params->INP_DOC_ORIGINAL;
     } else {
         $aData['INP_DOC_ORIGINAL'] = 'ORIGINAL';
     }
     $aData['INP_DOC_VERSIONING'] = $params->INP_DOC_VERSIONING;
     $aData['INP_DOC_DESCRIPTION'] = $params->INP_DOC_DESCRIPTION;
     $aData['INP_DOC_DESTINATION_PATH'] = $params->INP_DOC_DESTINATION_PATH;
     $aData['INP_DOC_TAGS'] = $params->INP_DOC_TAGS;
     $oInputDocument = new InputDocument();
     if ($aData['INP_DOC_UID'] == '') {
         unset($aData['INP_DOC_UID']);
         $oInputDocument->create($aData);
         $this->msg = G::LoadTranslation('ID_INPUT_DOC_SUCCESS_NEW');
     } else {
         $oInputDocument->update($aData);
         $this->msg = G::LoadTranslation('ID_INPUT_DOC_SUCCESS_UPDATE');
     }
     //refresh dbarray with the last change in inputDocument
     $oMap = new processMap();
     $oCriteria = $oMap->getInputDocumentsCriteria($aData['PRO_UID']);
     $this->success = true;
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:32,代码来源:processOptionsProxy.php

示例3: index

 /**
  * getting default list
  *
  * @param string $httpData->PRO_UID (opional)
  */
 public function index($httpData)
 {
     global $RBAC;
     $RBAC->requirePermissions('PM_SETUP_ADVANCE');
     G::LoadClass('configuration');
     $c = new Configurations();
     $configPage = $c->getConfiguration('additionalTablesList', 'pageSize', '', $_SESSION['USER_LOGGED']);
     $Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
     $this->includeExtJS('pmTables/list', $this->debug);
     $this->includeExtJS('pmTables/export', $this->debug);
     $this->setView('pmTables/list');
     //assigning js variables
     $this->setJSVar('FORMATS', $c->getFormats());
     $this->setJSVar('CONFIG', $Config);
     $this->setJSVar('PRO_UID', isset($_GET['PRO_UID']) ? $_GET['PRO_UID'] : false);
     $this->setJSVar('_PLUGIN_SIMPLEREPORTS', $this->_getSimpleReportPluginDef());
     if (isset($_SESSION['_cache_pmtables'])) {
         unset($_SESSION['_cache_pmtables']);
     }
     if (isset($_SESSION['ADD_TAB_UID'])) {
         unset($_SESSION['ADD_TAB_UID']);
     }
     //render content
     G::RenderPage('publish', 'extJs');
 }
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:30,代码来源:pmTables.php

示例4: setUp

 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before each test is executed.
  */
 protected function setUp()
 {
     // get Solr initialization variables
     // get Solr initialization variables
     $solrConf = array('solr_enabled' => 1, 'solr_host' => 'localhost', 'solr_instance' => 'os');
     G::LoadClass('AppSolr');
     $this->object = new AppSolr($solrConf['solr_enabled'], $solrConf['solr_host'], $solrConf['solr_instance']);
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:12,代码来源:AppSolrTest.php

示例5: wsBaseProcessList

function wsBaseProcessList($studentName)
{
    G::LoadClass('wsBase');
    $ws = new wsBase();
    $result = $ws->processList();
    //$result[] = array ( 'guid' => 'a' . $studentName , 'name' => 'bc' );
    //$result[] = array ( 'guid' => '2a' , 'name' => '2bc' .  $studentName );
    //$result[] = array ( 'guid' => '2a' , 'name' => '2bc' .  $studentName );
    return array("processes" => $result);
    //return array ( "status_code" => 12, "message" => 'abx', "timestamp" => 'aa' );
}
开发者ID:emildev35,项目名称:processmaker,代码行数:11,代码来源:wso2.php

示例6: pagedTable_BeforeQuery

function pagedTable_BeforeQuery(&$ntable)
{
    $file = G::decrypt($ntable->xmlForm->values['URL'], URL_KEY);
    /* Start Block: Defines the virtual XMLDB*/
    G::LoadClass('xmlDb');
    define('DB_XMLDB_HOST', PATH_DYNAFORM . $file . '.xml');
    define('DB_XMLDB_USER', '');
    define('DB_XMLDB_PASS', '');
    define('DB_XMLDB_NAME', '');
    define('DB_XMLDB_TYPE', 'myxml');
    /* End Block*/
}
开发者ID:emildev35,项目名称:processmaker,代码行数:12,代码来源:dynaforms_PagedTableAjax.php

示例7: updatePageSize

function updatePageSize()
{
    G::LoadClass('configuration');
    $c = new Configurations();
    $arr['pageSize'] = $_REQUEST['size'];
    $arr['dateSave'] = date('Y-m-d H:i:s');
    $config = array();
    $config[] = $arr;
    $c->aConfig = $config;
    $c->saveConfig('skinsList', 'pageSize', '', $_SESSION['USER_LOGGED']);
    echo '{success: true}';
}
开发者ID:emildev35,项目名称:processmaker,代码行数:12,代码来源:skin_Ajax.php

示例8: __construct

 /**
  * Constructor of the class
  *
  * return void
  */
 public function __construct()
 {
     try {
         foreach ($this->arrayFieldDefinition as $key => $value) {
             $this->arrayFieldNameForException[$value["fieldNameAux"]] = $key;
         }
         //Library
         \G::LoadClass("triggerLibrary");
         $this->library = \triggerLibrary::getSingleton();
     } catch (\Exception $e) {
         throw $e;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:18,代码来源:TriggerWizard.php

示例9: FupdateAPPDATATYPO3

function FupdateAPPDATATYPO3($APP_UID, $new = 0)
{
    $_SESSION["PM_RUN_OUTSIDE_MAIN_APP"] = true;
    G::LoadClass("case");
    $caseInstance = new Cases();
    $newFields = $caseInstance->loadCase($APP_UID);
    $newFields['APP_DATA']['FLAGTYPO3'] = 'On';
    $newFields['APP_DATA']['FLAG_ACTIONTYPO3'] = 'actionCreateCase';
    if ($_REQUEST['redirect']) {
        $newFields['APP_DATA']['FLAG_REDIRECT_PAGE'] = urldecode($_REQUEST['redirect']);
    }
    if ($new == 1) {
        $newFields['APP_DATA']['NUM_DOSSIER'] = $newFields['APP_NUMBER'];
    }
    PMFSendVariables($APP_UID, $newFields['APP_DATA']);
    $caseInstance->updateCase($APP_UID, $newFields);
}
开发者ID:emildev35,项目名称:processmaker,代码行数:17,代码来源:endpoint.php

示例10: testingNW

 public function testingNW($params)
 {
     if (isset($_POST['NW_TITLE'])) {
         $action = isset($_POST['action']) ? trim($_POST['action']) : 'test';
         $ao_db_drop = isset($_POST['AO_DB_DROP']) ? true : false;
         G::LoadClass('Installer');
         //G::LoadClass( 'json' );
         $name = trim($_POST['NW_TITLE']);
         $inst = new Installer();
         if ($inst->isset_site($name) && $ao_db_drop !== true) {
             $this->error = true;
             return;
         }
         $user = isset($_POST['NW_USERNAME']) ? trim($_POST['NW_USERNAME']) : 'admin';
         $pass = isset($_POST['NW_PASSWORD']) ? $_POST['NW_PASSWORD'] : 'admin';
         $pass1 = isset($_POST['NW_PASSWORD2']) ? $_POST['NW_PASSWORD2'] : 'admin';
         $ao_db_wf = isset($_POST['AO_DB_WF']) ? $_POST['AO_DB_WF'] : false;
         $ao_db_rb = isset($_POST['AO_DB_RB']) ? $_POST['AO_DB_RB'] : false;
         $ao_db_rp = isset($_POST['AO_DB_RP']) ? $_POST['AO_DB_RP'] : false;
         $result = $inst->create_site(array('isset' => true, 'name' => $name, 'admin' => array('username' => $user, 'password' => $pass), 'advanced' => array('ao_db_drop' => $ao_db_drop, 'ao_db_wf' => $ao_db_wf, 'ao_db_rb' => $ao_db_rb, 'ao_db_rp' => $ao_db_rp)), $action === 'create' ? true : false);
         $result['result']['admin']['password'] = $pass === $pass1 ? true : false;
         $result['result']['action'] = $action;
         $_SESSION['NW_PASSWORD'] = $pass;
         $_SESSION['NW_PASSWORD2'] = $pass1;
         //$json = new Services_JSON();
         //G::pr($result['result']['database']);G::pr($action);
         $dbWf = $result['result']['database']['ao']['ao_db_wf']['status'];
         $dbRb = $result['result']['database']['ao']['ao_db_rb']['status'];
         $dbRp = $result['result']['database']['ao']['ao_db_rp']['status'];
         $wsAction = $action != '' ? 1 : 0;
         if ($dbWf && $action) {
             $this->success = true;
             //echo $json->encode($result);
         } else {
             //the site does not available
             $this->error = true;
             $this->message = $result['result']['database']['ao']['ao_db_wf']['message'];
             //$this->message .= ', ' . $result['result']['database']['ao']['ao_db_rb']['message'];
             //$this->message .= ', ' . $result['result']['database']['ao']['ao_db_rp']['message'];
         }
     } else {
         $this->error = true;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:44,代码来源:newSiteProxy.php

示例11: generateData

    /**
     * Generate data
     *
     * return void
     */
    public function generateData()
    {
        try {
            G::LoadClass("case");

            AppAssignSelfServiceValuePeer::doDeleteAll(); //Delete all records

            //Generate data
            $case = new Cases();

            $criteria = new Criteria("workflow");

            $criteria->addSelectColumn(AppDelegationPeer::APP_UID);
            $criteria->addSelectColumn(AppDelegationPeer::DEL_INDEX);
            $criteria->addSelectColumn(ApplicationPeer::APP_DATA);
            $criteria->addSelectColumn(AppDelegationPeer::PRO_UID);
            $criteria->addSelectColumn(TaskPeer::TAS_UID);
            $criteria->addSelectColumn(TaskPeer::TAS_GROUP_VARIABLE);
            $criteria->addJoin(AppDelegationPeer::APP_UID, ApplicationPeer::APP_UID, Criteria::LEFT_JOIN);
            $criteria->addJoin(AppDelegationPeer::TAS_UID, TaskPeer::TAS_UID, Criteria::LEFT_JOIN);
            $criteria->add(TaskPeer::TAS_ASSIGN_TYPE, "SELF_SERVICE", Criteria::EQUAL);
            $criteria->add(TaskPeer::TAS_GROUP_VARIABLE, "", Criteria::NOT_EQUAL);
            $criteria->add(AppDelegationPeer::USR_UID, "", Criteria::EQUAL);
            $criteria->add(AppDelegationPeer::DEL_THREAD_STATUS, "OPEN", Criteria::EQUAL);

            $rsCriteria = AppDelegationPeer::doSelectRS($criteria);
            $rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);

            while ($rsCriteria->next()) {
                $row = $rsCriteria->getRow();

                $applicationData = $case->unserializeData($row["APP_DATA"]);
                $taskGroupVariable = trim($row["TAS_GROUP_VARIABLE"], " @#");

                if ($taskGroupVariable != "" && isset($applicationData[$taskGroupVariable]) && trim($applicationData[$taskGroupVariable]) != "") {
                    $this->create($row["APP_UID"], $row["DEL_INDEX"], array("PRO_UID" => $row["PRO_UID"], "TAS_UID" => $row["TAS_UID"], "GRP_UID" => trim($applicationData[$taskGroupVariable])));
                }
            }
        } catch (Exception $e) {
            throw $e;
        }
    }
开发者ID:rrsc,项目名称:processmaker,代码行数:47,代码来源:AppAssignSelfServiceValue.php

示例12: getWorkspacesAvailable

function getWorkspacesAvailable()
{
    G::LoadClass('serverConfiguration');
    $oServerConf =& serverConf::getSingleton();
    $dir = PATH_DB;
    $filesArray = array();
    if (file_exists($dir)) {
        if ($handle = opendir($dir)) {
            while (false !== ($file = readdir($handle))) {
                if ($file != "." && $file != "..") {
                    if (file_exists(PATH_DB . $file . '/db.php')) {
                        if (!$oServerConf->isWSDisabled($file)) {
                            $filesArray[] = $file;
                        }
                    }
                }
            }
            closedir($handle);
        }
    }
    sort($filesArray, SORT_STRING);
    return $filesArray;
}
开发者ID:emildev35,项目名称:processmaker,代码行数:23,代码来源:sysLogin.php

示例13: steps

 function steps()
 {
     G::LoadClass('applications');
     $applications = new Applications();
     $proUid = isset($_SESSION['PROCESS']) ? $_SESSION['PROCESS'] : '';
     $tasUid = isset($_SESSION['TASK']) ? $_SESSION['TASK'] : '';
     $appUid = isset($_SESSION['APPLICATION']) ? $_SESSION['APPLICATION'] : '';
     $index = isset($_SESSION['INDEX']) ? $_SESSION['INDEX'] : '';
     $steps = $applications->getSteps($appUid, $index, $tasUid, $proUid);
     $list = array();
     foreach ($steps as $step) {
         $item['id'] = $item['idtodraw'] = $step['id'];
         $item['draggable'] = false;
         $item['leaf'] = true;
         $item['hrefTarget'] = 'casesSubFrame';
         $item['text'] = $step['title'];
         $item['url'] = '../' . $step['url'];
         switch ($step['type']) {
             case 'DYNAFORM':
                 $item['iconCls'] = 'ss_sprite ss_application_form';
                 break;
             case 'OUTPUT_DOCUMENT':
                 $item['iconCls'] = 'ss_sprite ss_application_put';
                 break;
             case 'INPUT_DOCUMENT':
                 $item['iconCls'] = 'ss_sprite ss_application_get';
                 break;
             case 'EXTERNAL':
                 $item['iconCls'] = 'ss_sprite ss_application_view_detail';
                 break;
             default:
                 $item['iconCls'] = 'ICON_ASSIGN_TASK';
         }
         $list[] = $item;
     }
     echo G::json_encode($list);
 }
开发者ID:nshong,项目名称:processmaker,代码行数:37,代码来源:ajaxListener.php

示例14: LookForChildren

/**
 * departments_Ajax.php
 *
 * ProcessMaker Open Source Edition
 * 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.
 */
function LookForChildren($parent, $level, $aDepUsers)
{
    G::LoadClass('configuration');
    $conf = new Configurations();
    $oDept = new Department();
    $allDepartments = $oDept->getDepartments($parent);
    $level++;
    $rows = array();
    foreach ($allDepartments as $department) {
        unset($depto);
        $depto['DEP_TITLE'] = str_replace(array("<", ">"), array("&lt;", "&gt;"), $department['DEP_TITLE']);
        $depto['DEP_STATUS'] = $department['DEP_STATUS'];
        if ($department['DEP_MANAGER_USERNAME'] != '') {
            $depto['DEP_MANAGER_NAME'] = $conf->usersNameFormat($department['DEP_MANAGER_USERNAME'], $department['DEP_MANAGER_FIRSTNAME'], $department['DEP_MANAGER_LASTNAME']);
        } else {
            $depto['DEP_MANAGER_NAME'] = '';
        }
        $depto['DEP_TOTAL_USERS'] = isset($aDepUsers[$department['DEP_UID']]) ? $aDepUsers[$department['DEP_UID']] : 0;
        $depto['DEP_UID'] = $department['DEP_UID'];
        $depto['DEP_MANAGER'] = $department['DEP_MANAGER'];
        $depto['DEP_PARENT'] = $department['DEP_PARENT'];
        if ($department['HAS_CHILDREN'] > 0) {
            $depto['children'] = LookForChildren($department['DEP_UID'], $level, $aDepUsers);
            $depto['iconCls'] = 'ss_sprite ss_chart_organisation';
            $depto['expanded'] = true;
        } else {
            $depto['leaf'] = true;
            if ($level == 1) {
                $depto['iconCls'] = 'ss_sprite ss_chart_organisation';
            } else {
                $depto['iconCls'] = 'ss_sprite ss_plugin';
            }
        }
        $rows[] = $depto;
    }
    return $rows;
}
开发者ID:bqevin,项目名称:processmaker,代码行数:59,代码来源:departments_Ajax.php

示例15: isApplicable

 public static function isApplicable()
 {
     if (!class_exists('System')) {
         G::LoadClass("System");
     }
     patch::$isPathchable = false;
     $con = Propel::getConnection("workflow");
     $stmt = $con->prepareStatement("describe TASK;");
     $rs = $stmt->executeQuery();
     $rs->next();
     while ($row = $rs->getRow()) {
         if ($row['Field'] == "TAS_GROUP_VARIABLE") {
             $version = System::getVersion();
             $version = explode('-', $version);
             if ($version[0] == '2.5.1') {
                 echo "Version " . $version[0] . " Patch\n";
                 patch::$isPathchable = true;
             }
             break;
         }
         $rs->next();
     }
     return patch::$isPathchable;
 }
开发者ID:bqevin,项目名称:processmaker,代码行数:24,代码来源:class.patch.php


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