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


PHP Configuration::exists方法代码示例

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


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

示例1: putConfigByUsr

    /**
     * Put Dashboard configuration by UserUid
     *
     * @param array $arrayData Data
     * @param string $usrUid
     *
     * return array
     *
     * @author Jenny Murillo <jennylee@colosa.com>
     */
    public function putConfigByUsr($arrayData, $usrUid)
    {
    	$oConfig = new \Configuration();
    	
    	$cnfgData = array();
    	if($oConfig->exists('DASHBOARDS_SETTINGS', '', '', $usrUid, '') == true){
    		$data = $oConfig->load('DASHBOARDS_SETTINGS', '', '', $usrUid, '');
    		$cnfgData = unserialize($data['CFG_VALUE']);
    	}

    	if($arrayData['dashData']==""){
    		foreach($cnfgData as $dashId=>$dashData) {
    			$cnfgData[$dashData['dashId']]['dashFavorite'] = 0;
    		}
    		$cnfgData[$arrayData['dashId']]['dashId'] = $arrayData['dashId'];
    		$cnfgData[$arrayData['dashId']]['dashFavorite'] = $arrayData['dashFavorite'];
    		$cnfgData[$arrayData['dashId']]['dashData'] = $arrayData['dashData'];
    	} else{
    		$cnfgData[$arrayData['dashId']] = $arrayData;
    	}

    	$data['CFG_UID'] = 'DASHBOARDS_SETTINGS';
    	$data['OBJ_UID'] = '';
    	$data['CFG_VALUE'] = serialize($cnfgData);
    	$data['USR_UID'] = $usrUid;
    	$data['PRO_UID'] = "";
    	$data['APP_UID'] = "";

    	$response = $oConfig->update($data);
    	return $response;
    }
开发者ID:hpx2206,项目名称:processmaker-1,代码行数:41,代码来源:Dashboard.php

示例2: listFirstExecution

    /**

     * This function checks if List tables are going to migrated

     *

     * return boolean value

     */

    public function listFirstExecution ($action){

        $this->initPropel(true);

        switch ($action) {

           case 'insert':

                $conf  = new Configuration();

                if (!($conf->exists('MIGRATED_LIST', 'list', 'list', 'list', 'list'))) {

                    $data["CFG_UID"]  ='MIGRATED_LIST';

                    $data["OBJ_UID"]  ='list';

                    $data["CFG_VALUE"]='true';

                    $data["PRO_UID"]  ='list';

                    $data["USR_UID"]  ='list';

                    $data["APP_UID"]  ='list';

                    $conf->create($data);

                }

                return true;

                break;

           case 'check':

                $criteria = new Criteria("workflow");

                $criteria->addSelectColumn(ConfigurationPeer::CFG_UID);

                $criteria->add(ConfigurationPeer::CFG_UID, "MIGRATED_LIST", CRITERIA::EQUAL);

                $rsCriteria = AppCacheViewPeer::doSelectRS($criteria);

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

                $aRows = array ();

                while ($rsCriteria->next()) {

                    $aRows[] = $rsCriteria->getRow();

                }

                if(empty($aRows)){

                    return false; //If is false continue with the migrated

                } else {

                    return true; //Stop

                }

                break;

           default:

                return true;

       }

    }
开发者ID:rrsc,项目名称:processmaker,代码行数:81,代码来源:class.wsTools.php

示例3: removeProcessRows


//.........这里部分代码省略.........

                    $oStage->remove( $aRow['STG_UID'] );

                }

                $oDataset->next();

            }



            //Delete the Event of process

            $oCriteria = new Criteria( 'workflow' );

            $oCriteria->add( EventPeer::PRO_UID, $sProUid );

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

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

            $oDataset->next();

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

                if ($oEvent->Exists( $aRow['EVN_UID'] )) {

                    $oEvent->remove( $aRow['EVN_UID'] );

                }

                $oDataset->next();

                if ($oEvent->existsByTaskUidFrom( $aRow['TAS_UID'] )) {

                    $aRowEvent = $oEvent->getRowByTaskUidFrom( $aRow['TAS_UID'] );

                    $oEvent->remove( $aRowEvent['EVN_UID'] );

                }

                $oDataset->next();

            }



            //Delete the CaseScheduler of process

            $oCriteria = new Criteria( 'workflow' );

            $oCriteria->add( CaseSchedulerPeer::PRO_UID, $sProUid );

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

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

            $oDataset->next();

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

                if ($oCaseScheduler->Exists( $aRow['SCH_UID'] )) {

                    $oCaseScheduler->remove( $aRow['SCH_UID'] );

                }
开发者ID:rrsc,项目名称:processmaker,代码行数:67,代码来源:class.processes.php

示例4: saveConfiguration

 /**
  * getting Save email configuration
  * @autor Alvaro  <alvaro@colosa.com>
  */
 public function saveConfiguration()
 {
     require_once 'classes/model/Configuration.php';
     try {
         $oConfiguration = new Configuration();
         $aFields['MESS_PASSWORD'] = $_POST['passwd'];
         if ($_POST['passwdHide'] != '') {
             $aFields['MESS_PASSWORD'] = $_POST['passwdHide'];
         }
         $aFields['MESS_PASSWORD_HIDDEN'] = '';
         $passwd = $aFields['MESS_PASSWORD'];
         $passwdDec = G::decrypt($passwd, 'EMAILENCRYPT');
         $auxPass = explode('hash:', $passwdDec);
         if (count($auxPass) > 1) {
             if (count($auxPass) == 2) {
                 $passwd = $auxPass[1];
             } else {
                 array_shift($auxPass);
                 $passwd = implode('', $auxPass);
             }
         }
         $aFields['MESS_PASSWORD'] = $passwd;
         if ($aFields['MESS_PASSWORD'] != '') {
             $aFields['MESS_PASSWORD'] = 'hash:' . $aFields['MESS_PASSWORD'];
             $aFields['MESS_PASSWORD'] = G::encrypt($aFields['MESS_PASSWORD'], 'EMAILENCRYPT');
         }
         $aFields['MESS_ENABLED'] = isset($_POST['EnableEmailNotifications']) ? $_POST['EnableEmailNotifications'] : '';
         $aFields['MESS_ENABLED'] = $aFields['MESS_ENABLED'] == 'true' ? '1' : $aFields['MESS_ENABLED'];
         $aFields['MESS_ENGINE'] = $_POST['EmailEngine'];
         $aFields['MESS_SERVER'] = trim($_POST['server']);
         $aFields['MESS_RAUTH'] = isset($_POST['req_auth']) ? $_POST['req_auth'] : '';
         $aFields['MESS_RAUTH'] = $aFields['MESS_RAUTH'] == 'true' ? '1' : $aFields['MESS_RAUTH'];
         $aFields['MESS_PORT'] = $_POST['port'];
         $aFields['MESS_ACCOUNT'] = $_POST['from'];
         $aFields['MESS_BACKGROUND'] = '';
         //isset($_POST['background']) ? $_POST['background'] : '';
         $aFields['MESS_EXECUTE_EVERY'] = '';
         //$_POST['form']['MESS_EXECUTE_EVERY'];
         $aFields['MESS_SEND_MAX'] = '';
         //$_POST['form']['MESS_SEND_MAX'];
         $aFields['SMTPSecure'] = $_POST['UseSecureCon'];
         $aFields['SMTPSecure'] = $aFields['SMTPSecure'] == 'No' ? 'none' : $aFields['SMTPSecure'];
         $aFields['MAIL_TO'] = $_POST['eMailto'];
         $aFields['MESS_TRY_SEND_INMEDIATLY'] = $_POST['SendaTestMail'];
         //isset($_POST['form']['MESS_TRY_SEND_INMEDIATLY']) ? $_POST['form']['MESS_TRY_SEND_INMEDIATLY'] : '';
         $aFields['MESS_TRY_SEND_INMEDIATLY'] = $aFields['MESS_TRY_SEND_INMEDIATLY'] == 'true' ? '1' : $aFields['MESS_TRY_SEND_INMEDIATLY'];
         $CfgUid = 'Emails';
         $ObjUid = '';
         $ProUid = '';
         $UsrUid = '';
         $AppUid = '';
         if ($oConfiguration->exists($CfgUid, $ObjUid, $ProUid, $UsrUid, $AppUid)) {
             $oConfiguration->update(array('CFG_UID' => 'Emails', 'OBJ_UID' => '', 'CFG_VALUE' => serialize($aFields), 'PRO_UID' => '', 'USR_UID' => '', 'APP_UID' => ''));
             $this->success = 'true';
             $this->msg = 'Saved';
         } else {
             $oConfiguration->create(array('CFG_UID' => 'Emails', 'OBJ_UID' => '', 'CFG_VALUE' => serialize($aFields), 'PRO_UID' => '', 'USR_UID' => '', 'APP_UID' => ''));
             $this->success = 'true';
             $this->msg = 'Saved';
         }
     } catch (Exception $e) {
         $this->success = false;
         $this->msg = $e->getMessage();
     }
 }
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:69,代码来源:adminProxy.php


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