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


PHP DBAdapter类代码示例

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


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

示例1: pushMsg

 public function pushMsg($desc, $detail, $type = MSG_SYSINFO)
 {
     $o_db = new DBAdapter(array('host' => $this->dbConf->crawler->host, 'username' => $this->dbConf->crawler->username, 'password' => $this->dbConf->crawler->password, 'schema' => $this->dbConf->crawler->schema, 'host' => $this->dbConf->crawler->host));
     $sql = "INSERT INTO " . $this->dbConf->crawler->schema . ".messages (m_description,m_detail) VALUES (";
     $sql .= "'" . $type . addslashes($desc) . "','" . addslashes($detail) . "')";
     //executeNoresSQL($query)
     $done = false;
     if (!$o_db->executeNoresSQL($sql)) {
         unset($o_db);
     } else {
         unset($o_db);
         $done = true;
     }
     return $done;
 }
开发者ID:sergrin,项目名称:crawlers-il,代码行数:15,代码来源:Message.class.php

示例2: existsTitle

 /**
  * Verify if exists the title of a Group
  *
  * @param string $groupTitle      Title
  * @param string $groupUidExclude Unique id of Group to exclude
  *
  * return bool Return true if exists the title of a Group, false otherwise
  */
 public function existsTitle($groupTitle, $groupUidExclude = "")
 {
     try {
         $delimiter = \DBAdapter::getStringDelimiter();
         $criteria = new \Criteria("workflow");
         $criteria->addSelectColumn(\GroupwfPeer::GRP_UID);
         $criteria->addAlias("CT", \ContentPeer::TABLE_NAME);
         $arrayCondition = array();
         $arrayCondition[] = array(\GroupwfPeer::GRP_UID, "CT.CON_ID", \Criteria::EQUAL);
         $arrayCondition[] = array("CT.CON_CATEGORY", $delimiter . "GRP_TITLE" . $delimiter, \Criteria::EQUAL);
         $arrayCondition[] = array("CT.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
         $criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
         if ($groupUidExclude != "") {
             $criteria->add(\GroupwfPeer::GRP_UID, $groupUidExclude, \Criteria::NOT_EQUAL);
         }
         $criteria->add("CT.CON_VALUE", $groupTitle, \Criteria::EQUAL);
         $rsCriteria = \GroupwfPeer::doSelectRS($criteria);
         if ($rsCriteria->next()) {
             return true;
         } else {
             return false;
         }
     } catch (\Exception $e) {
         throw $e;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:34,代码来源:Group.php

示例3: getTriggerCriteria

 /**
  * Get criteria for Trigger
  *
  * return object
  */
 public function getTriggerCriteria()
 {
     try {
         $delimiter = \DBAdapter::getStringDelimiter();
         $criteria = new \Criteria("workflow");
         $criteria->addSelectColumn(\TriggersPeer::TRI_UID);
         $criteria->addAsColumn("TRI_TITLE", "CT.CON_VALUE");
         $criteria->addAsColumn("TRI_DESCRIPTION", "CD.CON_VALUE");
         $criteria->addSelectColumn(\TriggersPeer::TRI_TYPE);
         $criteria->addSelectColumn(\TriggersPeer::TRI_WEBBOT);
         $criteria->addSelectColumn(\TriggersPeer::TRI_PARAM);
         $criteria->addAlias("CT", \ContentPeer::TABLE_NAME);
         $criteria->addAlias("CD", \ContentPeer::TABLE_NAME);
         $arrayCondition = array();
         $arrayCondition[] = array(\TriggersPeer::TRI_UID, "CT.CON_ID", \Criteria::EQUAL);
         $arrayCondition[] = array("CT.CON_CATEGORY", $delimiter . "TRI_TITLE" . $delimiter, \Criteria::EQUAL);
         $arrayCondition[] = array("CT.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
         $criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
         $arrayCondition = array();
         $arrayCondition[] = array(\TriggersPeer::TRI_UID, "CD.CON_ID", \Criteria::EQUAL);
         $arrayCondition[] = array("CD.CON_CATEGORY", $delimiter . "TRI_DESCRIPTION" . $delimiter, \Criteria::EQUAL);
         $arrayCondition[] = array("CD.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
         $criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
         return $criteria;
     } catch (\Exception $e) {
         throw $e;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:33,代码来源:Trigger.php

示例4: getEvents

 /**
  * Get list for Events
  * @var string $pro_uid. Uid for Process
  * @var string $filter.
  * @var string $evn_uid. Uid for Process
  *
  * @access public
  * @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
  * @copyright Colosa - Bolivia
  *
  * @return array
  */
 public function getEvents($pro_uid, $filter = '', $evn_uid = '')
 {
     $pro_uid = $this->validateProUid($pro_uid);
     if ($evn_uid != '') {
         $evn_uid = $this->validateEvnUid($evn_uid);
     }
     $oProcess = new \Process();
     if (!$oProcess->processExists($pro_uid)) {
         throw new \Exception(\G::LoadTranslation("ID_PROCESS_NOT_EXIST", array('pro_uid', $pro_uid)));
     }
     $sDelimiter = \DBAdapter::getStringDelimiter();
     $oCriteria = new \Criteria('workflow');
     $oCriteria->addSelectColumn(\EventPeer::EVN_UID);
     $oCriteria->addSelectColumn(\EventPeer::EVN_ACTION);
     $oCriteria->addSelectColumn(\EventPeer::EVN_STATUS);
     $oCriteria->addSelectColumn(\EventPeer::EVN_WHEN_OCCURS);
     $oCriteria->addSelectColumn(\EventPeer::EVN_RELATED_TO);
     $oCriteria->addAsColumn('EVN_DESCRIPTION', \ContentPeer::CON_VALUE);
     $aConditions = array();
     $aConditions[] = array(\EventPeer::EVN_UID, \ContentPeer::CON_ID);
     $aConditions[] = array(\ContentPeer::CON_CATEGORY, $sDelimiter . 'EVN_DESCRIPTION' . $sDelimiter);
     $aConditions[] = array(\ContentPeer::CON_LANG, $sDelimiter . SYS_LANG . $sDelimiter);
     $oCriteria->addJoinMC($aConditions, \Criteria::LEFT_JOIN);
     $oCriteria->add(\EventPeer::PRO_UID, $pro_uid);
     if ($evn_uid != '') {
         $oCriteria->add(\EventPeer::EVN_UID, $evn_uid);
     }
     switch ($filter) {
         case 'message':
             $oCriteria->add(\EventPeer::EVN_ACTION, "SEND_MESSAGE");
             break;
         case 'conditional':
             $oCriteria->add(\EventPeer::EVN_ACTION, "EXECUTE_CONDITIONAL_TRIGGER");
             break;
         case 'multiple':
             $oCriteria->add(\EventPeer::EVN_ACTION, "EXECUTE_TRIGGER");
             break;
     }
     $eventsArray = array();
     $oDataset = \EventPeer::doSelectRS($oCriteria);
     $oDataset->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
     $oDataset->next();
     while ($aRow = $oDataset->getRow()) {
         $oEvent = new \Event();
         $aFields = $oEvent->load($aRow['EVN_UID']);
         $aRow = array_merge($aRow, $aFields);
         $eventsArray[] = array_change_key_case($aRow, CASE_LOWER);
         $oDataset->next();
     }
     if ($evn_uid != '' && empty($eventsArray)) {
         throw new \Exception(\G::LoadTranslation("ID_ROW_DOES_NOT_EXIST"));
     } elseif ($evn_uid != '' && !empty($eventsArray)) {
         return current($eventsArray);
     }
     return $eventsArray;
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:68,代码来源:Event.php

示例5: loadByCategoryId

 public function loadByCategoryId($sCategoryUid)
 {
     $c = new Criteria('workflow');
     $del = DBAdapter::getStringDelimiter();
     $c->clearSelectColumns();
     $c->addSelectColumn(ProcessCategoryPeer::CATEGORY_NAME);
     $c->add(ProcessCategoryPeer::CATEGORY_UID, $sCategoryUid);
     $dataset = ProcessCategoryPeer::doSelectRS($c);
     $dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $dataset->next();
     $aRow = $dataset->getRow();
     return $aRow['CATEGORY_NAME'];
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:13,代码来源:ProcessCategory.php

示例6: loadDefaultAccount

 /**
  * Get the evn_description column value.
  *
  * @return string
  */
 public function loadDefaultAccount()
 {
     $c = new Criteria('workflow');
     $del = DBAdapter::getStringDelimiter();
     $c->clearSelectColumns();
     $c->addSelectColumn(EmailServerPeer::MESS_ACCOUNT);
     $c->add(EmailServerPeer::MESS_DEFAULT, 1);
     $rs = EmailServerPeer::doSelectRS($c, Propel::getDBConnection('workflow_ro'));
     $rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $rs->next();
     $row = $rs->getRow();
     $response = $row;
     return $response;
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:19,代码来源:EmailServer.php

示例7: getCriteriaDBSList

 public function getCriteriaDBSList($sProcessUID)
 {
     $sDelimiter = DBAdapter::getStringDelimiter();
     $oCriteria = new Criteria('workflow');
     $oCriteria->addSelectColumn(DbSourcePeer::DBS_UID);
     $oCriteria->addSelectColumn(DbSourcePeer::PRO_UID);
     $oCriteria->addSelectColumn(DbSourcePeer::DBS_TYPE);
     $oCriteria->addSelectColumn(DbSourcePeer::DBS_SERVER);
     $oCriteria->addSelectColumn(DbSourcePeer::DBS_DATABASE_NAME);
     $oCriteria->addSelectColumn(DbSourcePeer::DBS_USERNAME);
     $oCriteria->addSelectColumn(DbSourcePeer::DBS_PASSWORD);
     $oCriteria->addSelectColumn(DbSourcePeer::DBS_PORT);
     $oCriteria->addAsColumn('DBS_DESCRIPTION', 'C.CON_VALUE');
     $oCriteria->addAlias('C', 'CONTENT');
     $aConditions = array();
     $aConditions[] = array(DbSourcePeer::DBS_UID, 'C.CON_ID');
     $aConditions[] = array('C.CON_CATEGORY', $sDelimiter . 'DBS_DESCRIPTION' . $sDelimiter);
     $aConditions[] = array('C.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter);
     $oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
     $oCriteria->add(DbSourcePeer::PRO_UID, $sProcessUID);
     return $oCriteria;
 }
开发者ID:bqevin,项目名称:processmaker,代码行数:22,代码来源:DbSource.php

示例8: getCriteriaDBSList

 public function getCriteriaDBSList($sProcessUID)
 {
     $sDelimiter = DBAdapter::getStringDelimiter();
     $oCriteria = new Criteria('workflow');
     $oCriteria->addSelectColumn(DbSourcePeer::DBS_UID);
     $oCriteria->addSelectColumn(DbSourcePeer::PRO_UID);
     $oCriteria->addSelectColumn(DbSourcePeer::DBS_TYPE);
     $oCriteria->addAsColumn("DBS_SERVER", "CASE WHEN " . DbSourcePeer::DBS_TYPE . " = 'oracle' AND " . DbSourcePeer::DBS_CONNECTION_TYPE . " = 'TNS' THEN CONCAT('[', " . DbSourcePeer::DBS_TNS . ", ']') ELSE " . DbSourcePeer::DBS_SERVER . " END");
     $oCriteria->addAsColumn("DBS_DATABASE_NAME", "CASE WHEN " . DbSourcePeer::DBS_TYPE . " = 'oracle' AND " . DbSourcePeer::DBS_CONNECTION_TYPE . " = 'TNS' THEN CONCAT('[', " . DbSourcePeer::DBS_TNS . ", ']') ELSE " . DbSourcePeer::DBS_DATABASE_NAME . " END");
     $oCriteria->addSelectColumn(DbSourcePeer::DBS_USERNAME);
     $oCriteria->addSelectColumn(DbSourcePeer::DBS_PASSWORD);
     $oCriteria->addSelectColumn(DbSourcePeer::DBS_PORT);
     $oCriteria->addAsColumn('DBS_DESCRIPTION', 'C.CON_VALUE');
     $oCriteria->addAlias('C', 'CONTENT');
     $aConditions = array();
     $aConditions[] = array(DbSourcePeer::DBS_UID, 'C.CON_ID');
     $aConditions[] = array('C.CON_CATEGORY', $sDelimiter . 'DBS_DESCRIPTION' . $sDelimiter);
     $aConditions[] = array('C.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter);
     $oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
     $oCriteria->add(DbSourcePeer::PRO_UID, $sProcessUID);
     return $oCriteria;
 }
开发者ID:norahmollo,项目名称:processmaker,代码行数:22,代码来源:DbSource.php

示例9: getSubprocesss

 /**
  * Get SubProcess in Process
  *
  * return object
  */
 public function getSubprocesss($pro_uid, $tas_uid)
 {
     try {
         $pro_uid = $this->validateProUid($pro_uid);
         $tas_uid = $this->validateTasUid($tas_uid);
         $oCriteria = new \Criteria('workflow');
         $del = \DBAdapter::getStringDelimiter();
         $oCriteria->add(SubProcessPeer::PRO_PARENT, $pro_uid);
         $oCriteria->add(SubProcessPeer::TAS_PARENT, $tas_uid);
         $oCriteria->addAsColumn('CON_VALUE', 'C1.CON_VALUE', 'CON_TITLE');
         $oCriteria->addAlias("C1", 'CONTENT');
         $tasTitleConds = array();
         $tasTitleConds[] = array(SubProcessPeer::TAS_PARENT, 'C1.CON_ID');
         $tasTitleConds[] = array('C1.CON_CATEGORY', $del . 'TAS_TITLE' . $del);
         $tasTitleConds[] = array('C1.CON_LANG', $del . SYS_LANG . $del);
         $oCriteria->addJoinMC($tasTitleConds, \Criteria::LEFT_JOIN);
         $oDataset = SubProcessPeer::doSelectRS($oCriteria);
         $oDataset->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
         $oDataset->next();
         $aRow = $oDataset->getRow();
         $aRow = array_change_key_case($aRow, CASE_LOWER);
         $response['spr_uid'] = $aRow['sp_uid'];
         $response['spr_pro_parent'] = $aRow['pro_parent'];
         $response['spr_tas_parent'] = $aRow['tas_parent'];
         $response['spr_pro'] = $aRow['pro_uid'];
         $response['spr_tas'] = $aRow['tas_uid'];
         $response['spr_name'] = $aRow['con_value'];
         $response['spr_synchronous'] = $aRow['sp_synchronous'];
         $response['spr_variables_out'] = unserialize($aRow['sp_variables_out']);
         if ((int) $response['spr_synchronous'] === 1) {
             $response['spr_variables_in'] = unserialize($aRow['sp_variables_in']);
         }
         return $response;
     } catch (\Exception $e) {
         throw $e;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:42,代码来源:Subprocess.php

示例10: array

     if (strpos($_POST['server'], "\\")) {
         $_POST['port'] = 'none';
     }
     $aData = array('DBS_UID' => $_POST['dbs_uid'], 'PRO_UID' => $_SESSION['PROCESS'], 'DBS_TYPE' => $_POST['type'], 'DBS_SERVER' => $_POST['server'], 'DBS_DATABASE_NAME' => $_POST['db_name'], 'DBS_USERNAME' => $_POST['user'], 'DBS_PASSWORD' => ($_POST['passwd'] == 'none' ? "" : G::encrypt($_POST['passwd'], $_POST['db_name'])) . "_2NnV3ujj3w", 'DBS_PORT' => $_POST['port'] == 'none' ? "" : $_POST['port'], 'DBS_ENCODE' => $_POST['enc']);
     $oDBSource->update($aData);
     $oContent->addContent('DBS_DESCRIPTION', '', $_POST['dbs_uid'], SYS_LANG, $_POST['desc']);
     break;
 case 'saveConnection':
     $oDBSource = new DbSource();
     $oContent = new Content();
     if (strpos($_POST['server'], "\\")) {
         $_POST['port'] = 'none';
     }
     $aData = array('PRO_UID' => $_SESSION['PROCESS'], 'DBS_TYPE' => $_POST['type'], 'DBS_SERVER' => $_POST['server'], 'DBS_DATABASE_NAME' => $_POST['db_name'], 'DBS_USERNAME' => $_POST['user'], 'DBS_PASSWORD' => ($_POST['passwd'] == 'none' ? "" : G::encrypt($_POST['passwd'], $_POST['db_name'])) . "_2NnV3ujj3w", 'DBS_PORT' => $_POST['port'] == 'none' ? "" : $_POST['port'], 'DBS_ENCODE' => $_POST['enc']);
     $newid = $oDBSource->create($aData);
     $sDelimiter = DBAdapter::getStringDelimiter();
     $oContent->addContent('DBS_DESCRIPTION', '', $newid, SYS_LANG, $_POST['desc']);
     break;
 case 'deleteDbConnection':
     try {
         $oDBSource = new DbSource();
         $oContent = new Content();
         $DBS_UID = $_POST['dbs_uid'];
         $PRO_UID = $_SESSION['PROCESS'];
         $oDBSource->remove($DBS_UID, $PRO_UID);
         $oContent->removeContent('DBS_DESCRIPTION', "", $DBS_UID);
         $result->success = true;
         $result->msg = G::LoadTranslation('ID_DBCONNECTION_REMOVED');
     } catch (Exception $e) {
         $result->success = false;
         $result->msg = $e->getMessage();
开发者ID:bqevin,项目名称:processmaker,代码行数:31,代码来源:dbConnectionsAjax.php

示例11: populateStmtValues

 /**
  * Populates values in a prepared statement.
  *
  * This method is designed to work with the createSelectSql() method, which creates
  * both the SELECT SQL statement and populates a passed-in array of parameter
  * values that should be substituted.
  *
  * <code>
  * $params = array();
  * $sql = BasePeer::createSelectSql($criteria, $params);
  * BasePeer::populateStmtValues($stmt, $params, Propel::getDatabaseMap($critera->getDbName()), Propel::getDB($criteria->getDbName()));
  * </code>
  *
  * @param      PDOStatement $stmt
  * @param      array $params array('column' => ..., 'table' => ..., 'value' => ...)
  * @param      DatabaseMap $dbMap
  * @return     int The number of params replaced.
  * @see        createSelectSql()
  * @see        doSelect()
  */
 public static function populateStmtValues(PDOStatement $stmt, array $params, DatabaseMap $dbMap, DBAdapter $db)
 {
     $i = 1;
     foreach ($params as $param) {
         $tableName = $param['table'];
         $columnName = $param['column'];
         $value = $param['value'];
         if (null === $value) {
             $stmt->bindValue(':p' . $i++, null, PDO::PARAM_NULL);
         } elseif (null !== $tableName) {
             $cMap = $dbMap->getTable($tableName)->getColumn($columnName);
             $type = $cMap->getType();
             $pdoType = $cMap->getPdoType();
             // FIXME - This is a temporary hack to get around apparent bugs w/ PDO+MYSQL
             // See http://pecl.php.net/bugs/bug.php?id=9919
             if ($pdoType == PDO::PARAM_BOOL && $db instanceof DBMySQL) {
                 $value = (int) $value;
                 $pdoType = PDO::PARAM_INT;
             } elseif (is_numeric($value) && $cMap->isEpochTemporal()) {
                 // it's a timestamp that needs to be formatted
                 if ($type == PropelColumnTypes::TIMESTAMP) {
                     $value = date($db->getTimestampFormatter(), $value);
                 } else {
                     if ($type == PropelColumnTypes::DATE) {
                         $value = date($db->getDateFormatter(), $value);
                     } else {
                         if ($type == PropelColumnTypes::TIME) {
                             $value = date($db->getTimeFormatter(), $value);
                         }
                     }
                 }
             } elseif ($value instanceof DateTime && $cMap->isTemporal()) {
                 // it's a timestamp that needs to be formatted
                 if ($type == PropelColumnTypes::TIMESTAMP || $type == PropelColumnTypes::BU_TIMESTAMP) {
                     $value = $value->format($db->getTimestampFormatter());
                 } else {
                     if ($type == PropelColumnTypes::DATE || $type == PropelColumnTypes::BU_DATE) {
                         $value = $value->format($db->getDateFormatter());
                     } else {
                         if ($type == PropelColumnTypes::TIME) {
                             $value = $value->format($db->getTimeFormatter());
                         }
                     }
                 }
             } elseif (is_resource($value) && $cMap->isLob()) {
                 // we always need to make sure that the stream is rewound, otherwise nothing will
                 // get written to database.
                 rewind($value);
             }
             $stmt->bindValue(':p' . $i++, $value, $pdoType);
         } else {
             $stmt->bindValue(':p' . $i++, $value);
         }
     }
     // foreach
 }
开发者ID:RadioCampusFrance,项目名称:airtime,代码行数:76,代码来源:BasePeer.php

示例12: taskCase

    /**

     * task Case

     *

     * @param string sessionId : The session ID which is obtained when logging in

     * @param string caseId : The case ID. The caseList() function can be used to find the ID number for cases

     * @return $result returns the current task for a given case. Note that the logged-in user must have privileges

     * to access the task

     */

    public function taskCase ($caseId)

    {

        $result = array ();

        try {

            $oCriteria = new Criteria( 'workflow' );

            $del       = DBAdapter::getStringDelimiter();

            $oCriteria->addSelectColumn( AppDelegationPeer::DEL_INDEX );

            $oCriteria->addSelectColumn( AppDelegationPeer::TAS_UID );



            $oCriteria->addAsColumn( 'TAS_TITLE', 'C1.CON_VALUE' );

            $oCriteria->addAlias( "C1", 'CONTENT' );

            $tasTitleConds   = array ();

            $tasTitleConds[] = array (AppDelegationPeer::TAS_UID,'C1.CON_ID');

            $tasTitleConds[] = array ('C1.CON_CATEGORY',$del . 'TAS_TITLE' . $del);

            $tasTitleConds[] = array ('C1.CON_LANG',$del . SYS_LANG . $del);

            $oCriteria->addJoinMC( $tasTitleConds, Criteria::LEFT_JOIN );



            $oCriteria->add( AppDelegationPeer::APP_UID, $caseId );

            $oCriteria->add( AppDelegationPeer::DEL_THREAD_STATUS, 'OPEN' );

            $oCriteria->add( AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL );

            $oDataset = AppDelegationPeer::doSelectRS( $oCriteria );

            $oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );

            $oDataset->next();



            while ($aRow = $oDataset->getRow()) {

                $result[] = array (

                    'guid'     => $aRow['TAS_UID'],

                    'name'     => $aRow['TAS_TITLE'],

                    'delegate' => $aRow['DEL_INDEX']

                );

                $oDataset->next();

            }



            return $result;

        } catch (Exception $e) {

            $result[] = array ('guid' => $e->getMessage(),'name' => $e->getMessage(), 'delegate' => $e->getMessage() );



            return $result;

        }

    }
开发者ID:nhenderson,项目名称:processmaker,代码行数:95,代码来源:class.wsBase.php

示例13: reportsPatch

 /** 
  * Patch for reports by The Answer (17-10-2k8)
  * 
  * 
  * @name reportsPatch
  *
  * param 
  * @return void
  */
 function reportsPatch()
 {
     require_once 'classes/model/AppDelegation.php';
     $oCriteria = new Criteria('workflow');
     $del = DBAdapter::getStringDelimiter();
     $oCriteria->addSelectColumn(AppDelegationPeer::APP_UID);
     $oCriteria->addSelectColumn(AppDelegationPeer::DEL_INDEX);
     $oCriteria->addSelectColumn(AppDelegationPeer::TAS_UID);
     $oCriteria->addSelectColumn(AppDelegationPeer::DEL_DELEGATE_DATE);
     $oCriteria->addSelectColumn(AppDelegationPeer::DEL_INIT_DATE);
     $oCriteria->addSelectColumn(AppDelegationPeer::DEL_FINISH_DATE);
     $oCriteria->addSelectColumn(AppDelegationPeer::DEL_DURATION);
     $oDataset = AppDelegationPeer::doSelectRS($oCriteria);
     $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $oDataset->next();
     while ($aRow = $oDataset->getRow()) {
         $oAppDelegation = new AppDelegation();
         $aData['APP_UID'] = $aRow['APP_UID'];
         $aData['DEL_INDEX'] = $aRow['DEL_INDEX'];
         $aData['DEL_DELEGATE_DATE'] = $aRow['DEL_DELEGATE_DATE'];
         if ($aRow['DEL_INIT_DATE'] == NULL) {
             $aData['DEL_INIT_DATE'] = $aRow['DEL_DELEGATE_DATE'];
         } else {
             $aData['DEL_INIT_DATE'] = $aRow['DEL_INIT_DATE'];
         }
         //$aData['DEL_FINISH_DATE']=$aRow['DEL_FINISH_DATE'];
         if ($aRow['DEL_DURATION'] != 0) {
             G::LoadClass('dates');
             $oDates = new dates();
             $aData['DEL_DURATION'] = $oDates->calculateDuration($aData['DEL_INIT_DATE'], $aRow['DEL_FINISH_DATE'], null, null, $aRow['TAS_UID']);
         }
         $oAppDelegation->update($aData);
         $oDataset->next();
     }
     return;
 }
开发者ID:nshong,项目名称:processmaker,代码行数:45,代码来源:class.report.php

示例14: getExtTriggersList

 public function getExtTriggersList($start, $limit, $sProcessUID = '')
 {
     $sDelimiter = DBAdapter::getStringDelimiter();
     $oCriteria = new Criteria('workflow');
     $oCriteria->addSelectColumn(TriggersPeer::TRI_UID);
     $oCriteria->addSelectColumn(TriggersPeer::PRO_UID);
     $oCriteria->add(TriggersPeer::PRO_UID, $sProcessUID);
     $this->tmpCriteria = clone $oCriteria;
     $oCriteria->addAsColumn('TRI_TITLE', 'C1.CON_VALUE');
     $oCriteria->addAsColumn('TRI_DESCRIPTION', 'C2.CON_VALUE');
     $oCriteria->addAlias('C1', 'CONTENT');
     $oCriteria->addAlias('C2', 'CONTENT');
     $aConditions = array();
     $aConditions[] = array(TriggersPeer::TRI_UID, 'C1.CON_ID');
     $aConditions[] = array('C1.CON_CATEGORY', $sDelimiter . 'TRI_TITLE' . $sDelimiter);
     $aConditions[] = array('C1.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter);
     $oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
     $aConditions = array();
     $aConditions[] = array(TriggersPeer::TRI_UID, 'C2.CON_ID');
     $aConditions[] = array('C2.CON_CATEGORY', $sDelimiter . 'TRI_TITLE' . $sDelimiter);
     $aConditions[] = array('C2.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter);
     $oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
     $oCriteria->add(TriggersPeer::PRO_UID, $sProcessUID);
     $oCriteria->addAscendingOrderByColumn('TRI_TITLE');
     if ($start != '') {
         $oCriteria->setOffset($start);
     }
     if ($limit != '') {
         $oCriteria->setLimit($limit);
     }
     $oDataset = TriggersPeer::doSelectRS($oCriteria);
     $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $oDataset->next();
     $triggersArray = "";
     $triggersArray[] = array('TRI_UID' => 'char', 'PRO_UID' => 'char', 'TRI_TITLE' => 'char', 'TRI_DESCRIPTION' => 'char');
     while ($aRow = $oDataset->getRow()) {
         if ($aRow['TRI_TITLE'] == null || $aRow['TRI_TITLE'] == "") {
             // There is no translation for this Trigger name, try to get/regenerate the label
             $triggerO = new Triggers();
             $triggerObj = $triggerO->load($aRow['TRI_UID']);
             $aRow['TRI_TITLE'] = $triggerObj['TRI_TITLE'];
             $aRow['TRI_DESCRIPTION'] = $triggerObj['TRI_DESCRIPTION'];
         }
         $triggersArray[] = $aRow;
         $oDataset->next();
     }
     return $triggersArray;
 }
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:48,代码来源:class.processMap.php

示例15: getInputDocumentCriteria

 /**
  * Get criteria for InputDocument
  *
  * return object
  */
 public function getInputDocumentCriteria()
 {
     try {
         $delimiter = \DBAdapter::getStringDelimiter();
         $criteria = new \Criteria("workflow");
         $criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_UID);
         $criteria->addAsColumn("INP_DOC_TITLE", "CT.CON_VALUE");
         $criteria->addAsColumn("INP_DOC_DESCRIPTION", "CD.CON_VALUE");
         $criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_FORM_NEEDED);
         $criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_ORIGINAL);
         $criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_PUBLISHED);
         $criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_VERSIONING);
         $criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_DESTINATION_PATH);
         $criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_TAGS);
         $criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_TYPE_FILE);
         $criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_MAX_FILESIZE);
         $criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_MAX_FILESIZE_UNIT);
         $criteria->addAlias("CT", \ContentPeer::TABLE_NAME);
         $criteria->addAlias("CD", \ContentPeer::TABLE_NAME);
         $arrayCondition = array();
         $arrayCondition[] = array(\InputDocumentPeer::INP_DOC_UID, "CT.CON_ID", \Criteria::EQUAL);
         $arrayCondition[] = array("CT.CON_CATEGORY", $delimiter . "INP_DOC_TITLE" . $delimiter, \Criteria::EQUAL);
         $arrayCondition[] = array("CT.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
         $criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
         $arrayCondition = array();
         $arrayCondition[] = array(\InputDocumentPeer::INP_DOC_UID, "CD.CON_ID", \Criteria::EQUAL);
         $arrayCondition[] = array("CD.CON_CATEGORY", $delimiter . "INP_DOC_DESCRIPTION" . $delimiter, \Criteria::EQUAL);
         $arrayCondition[] = array("CD.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
         $criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
         return $criteria;
     } catch (\Exception $e) {
         throw $e;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:39,代码来源:InputDocument.php


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