當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。