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


PHP Context::gets方法代码示例

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


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

示例1: procCommunicationAdminInsertConfig

 /**
  * save configurations of the communication module
  * @return void|Object (success : void, fail : Object)
  */
 function procCommunicationAdminInsertConfig()
 {
     // get the default information
     $args = Context::gets('skin', 'colorset', 'editor_skin', 'sel_editor_colorset', 'mskin', 'mcolorset', 'layout_srl', 'mlayout_srl', 'grant_write_default', 'grant_write_group');
     $args->editor_colorset = $args->sel_editor_colorset;
     unset($args->sel_editor_colorset);
     if (!$args->skin) {
         $args->skin = 'default';
     }
     if (!$args->colorset) {
         $args->colorset = 'white';
     }
     if (!$args->editor_skin) {
         $args->editor_skin = 'default';
     }
     if (!$args->mskin) {
         $args->mskin = 'default';
     }
     if (!$args->layout_srl) {
         $args->layout_srl = NULL;
     }
     $oCommunicationModel = getModel('communication');
     $args->grant_write = $oCommunicationModel->getGrantArray($args->grant_write_default, $args->grant_write_group);
     unset($args->grant_write_default);
     unset($args->grant_write_group);
     // create the module module Controller object
     $oModuleController = getController('module');
     $output = $oModuleController->insertModuleConfig('communication', $args);
     $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispCommunicationAdminConfig');
     return $this->setRedirectUrl($returnUrl, $output);
 }
开发者ID:kimkucheol,项目名称:xe-core,代码行数:35,代码来源:communication.admin.controller.php

示例2: procTextmessageAdminInsertConfig

 /**
  * @brief 기본설정 module config 에 저장
  **/
 function procTextmessageAdminInsertConfig()
 {
     $oTextmessageModel =& getModel('textmessage');
     $args = Context::gets('api_key', 'api_secret', 'callback_url', 'encode_utf16');
     // save module configuration.
     $oModuleControll = getController('module');
     $output = $oModuleControll->insertModuleConfig('textmessage', $args);
     $this->setMessage('success_saved');
     $redirectUrl = getNotEncodedUrl('', 'module', 'admin', 'act', 'dispTextmessageAdminConfig');
     $this->setRedirectUrl($redirectUrl);
 }
开发者ID:umjinsun12,项目名称:dngshin,代码行数:14,代码来源:textmessage.admin.controller.php

示例3: procSpamfilterAdminInsertConfig

 /**
  * @brief 스팸필터 설정
  **/
 function procSpamfilterAdminInsertConfig()
 {
     // 기본 정보를 받음
     $args = Context::gets('interval', 'limit_count', 'check_trackback');
     if ($args->check_trackback != 'Y') {
         $args->check_trackback = 'N';
     }
     // module Controller 객체 생성하여 입력
     $oModuleController =& getController('module');
     $output = $oModuleController->insertModuleConfig('spamfilter', $args);
     return $output;
 }
开发者ID:hottaro,项目名称:xpressengine,代码行数:15,代码来源:spamfilter.admin.controller.php

示例4: procNotificationAdminInsert

 /**
  * @brief notification append
  **/
 function procNotificationAdminInsert()
 {
     $params = Context::gets('content', 'mail_content', 'module_srls', 'msgtype', 'sending_method', 'cellphone_fieldname', 'use_authdata');
     $extra_vars = new StdClass();
     $extra_vars->sender_phone = Context::get('sender_phone');
     $extra_vars->admin_phones = Context::get('admin_phones');
     $extra_vars->admin_emails = Context::get('admin_emails');
     $extra_vars->cellphone_fieldname = Context::get('cellphone_fieldname');
     $extra_vars->use_authdata = Context::get('use_authdata');
     $extra_vars->reverse_notify = Context::get('reverse_notify');
     $extra_vars->use_extravar = Context::get('use_extravar');
     $extra_vars->use_extravar_email = Context::get('use_extravar_email');
     $extra_vars->force_notify = Context::get('force_notify');
     $extra_vars->email_sender_name = Context::get('email_sender_name');
     $extra_vars->email_sender_address = Context::get('email_sender_address');
     $params->notification_srl = Context::get('noti_srl');
     if ($params->notification_srl) {
         // delete existences
         $args->notification_srl = $params->notification_srl;
         $output = executeQuery('notification.deleteNotiCom', $args);
         if (!$output->toBool()) {
             return $output;
         }
         $output = executeQuery('notification.deleteNotificationModuleSrl', $args);
         if (!$output->toBool()) {
             return $output;
         }
     } else {
         // new sequence
         $params->notification_srl = getNextSequence();
     }
     // insert module srls
     $module_srls = explode(',', $params->module_srls);
     foreach ($module_srls as $srl) {
         unset($args);
         $args->notification_srl = $params->notification_srl;
         $args->module_srl = $srl;
         $output = executeQuery('notification.insertNotificationModuleSrl', $args);
         if (!$output->toBool()) {
             return $output;
         }
     }
     $params->extra_vars = serialize($extra_vars);
     // insert notification
     $output = executeQuery('notification.insertNotiCom', $params);
     if (!$output->toBool()) {
         return $output;
     }
     $redirectUrl = getNotEncodedUrl('', 'module', 'admin', 'act', 'dispNotificationAdminModify', 'notification_srl', $params->notification_srl);
     $this->setRedirectUrl($redirectUrl);
 }
开发者ID:kang85,项目名称:xe-module-notification,代码行数:54,代码来源:notification.admin.controller.php

示例5: procMessageAdminInsertConfig

 /**
  * @brief Configuration
  */
 function procMessageAdminInsertConfig()
 {
     // Get information
     $args = Context::gets('skin', 'mskin', 'colorset', 'mcolorset');
     // Create a module Controller object
     $oModuleController = getController('module');
     $output = $oModuleController->insertModuleConfig('message', $args);
     if (!$output->toBool()) {
         return $output;
     }
     $this->setMessage('success_updated');
     $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispMessageAdminConfig');
     $this->setRedirectUrl($returnUrl);
 }
开发者ID:rhymix,项目名称:rhymix,代码行数:17,代码来源:message.admin.controller.php

示例6: procLdapAdminInsertConfig

 /**
  * @brief LDAP 인증 연동  설정
  **/
 function procLdapAdminInsertConfig()
 {
     // 기본 정보를 받음
     $args = Context::gets('use_ldap', 'ldap_server', 'ldap_port', 'ldap_userdn_prefix', 'ldap_userdn_suffix', 'ldap_basedn', 'ldap_email_entry', 'ldap_nickname_entry', 'ldap_username_entry', 'ldap_group_entry');
     if ($args->use_ldap != 'Y') {
         $args->use_ldap = 'N';
     }
     if (!$args->ldap_port) {
         $args->ldap_port = 389;
     }
     // module Controller 객체 생성하여 입력
     $oModuleController =& getController('module');
     $output = $oModuleController->insertModuleConfig('ldap', $args);
     return $output;
 }
开发者ID:hottaro,项目名称:xpressengine,代码行数:18,代码来源:ldap.admin.controller.php

示例7: testSetGetVars

 public function testSetGetVars()
 {
     $this->assertSame(Context::get('var1'), null);
     Context::set('var1', 'val1');
     $this->assertSame(Context::get('var1'), 'val1');
     Context::set('var2', 'val2');
     $this->assertSame(Context::get('var2'), 'val2');
     Context::set('var3', 'val3');
     $data = new stdClass();
     $data->var1 = 'val1';
     $data->var2 = 'val2';
     $this->assertEquals(Context::gets('var1', 'var2'), $data);
     $data->var3 = 'val3';
     $this->assertEquals(Context::getAll(), $data);
 }
开发者ID:relip,项目名称:xe-core,代码行数:15,代码来源:ContextTest.php

示例8: procPaynotyAdminInsert

	/**
	 * @brief saving config values.
	 **/
	function procPaynotyAdminInsert() 
	{
		$params = Context::gets('admin_phones','admin_emails','sender_name','sender_email','content','mail_content','module_srls','msgtype','sending_method');
		$params->config_srl = Context::get('config_srl');

		if ($params->config_srl) 
		{
			// delete existences
			$args->config_srl = $params->config_srl;
			$output = executeQuery('paynoty.deleteConfig', $args);
			if (!$output->toBool()) return $output;
			$output = executeQuery('paynoty.deleteModule', $args);
			if (!$output->toBool()) return $output;
		}
		else
		{
			// new sequence
			$params->config_srl = getNextSequence();
		}

		// insert module srls
		$module_srls = explode(',', $params->module_srls);
		foreach ($module_srls as $srl) 
		{
			unset($args);
			$args->config_srl = $params->config_srl;
			$args->module_srl = $srl;
			$output = executeQuery('paynoty.insertModuleSrl', $args);
			if (!$output->toBool()) return $output;
		}

		//$params->extra_vars = serialize($extra_vars);

		debugPrint('params : ' . serialize($params));
		// insert paynoty
		$output = executeQuery('paynoty.insertConfig', $params);
		debugPrint('insertConfig : ' . serialize($output));
		if (!$output->toBool()) 
		{
			return $output;
		}

		$redirectUrl = getNotEncodedUrl('', 'module', 'admin', 'act', 'dispPaynotyAdminModify','config_srl',$params->config_srl);
		$this->setRedirectUrl($redirectUrl);
	}
开发者ID:WEN2ER,项目名称:nurigo,代码行数:48,代码来源:paynoty.admin.controller.php

示例9: procKrzipAdminInsertConfig

 /**
  * @brief 설정
  **/
 function procKrzipAdminInsertConfig()
 {
     // 기본 정보를 받음
     $args = Context::gets('krzip_server_hostname', 'krzip_server_port', 'krzip_server_query');
     if (!$args->krzip_server_hostname) {
         $args->krzip_server_hostname = $this->hostname;
     }
     if (!$args->krzip_server_port) {
         $args->krzip_server_port = $this->port;
     }
     if (!$args->krzip_server_query) {
         $args->krzip_server_query = $this->query;
     }
     // module Controller 객체 생성하여 입력
     $oModuleController =& getController('module');
     $output = $oModuleController->insertModuleConfig('krzip', $args);
     return $output;
 }
开发者ID:hottaro,项目名称:xpressengine,代码行数:21,代码来源:krzip.admin.controller.php

示例10: procCommunicationAdminInsertConfig

 /**
  * @brief communication 모듈 설정 저장
  **/
 function procCommunicationAdminInsertConfig()
 {
     // 기본 정보를 받음
     $args = Context::gets('skin', 'colorset', 'editor_skin', 'editor_colorset');
     if (!$args->skin) {
         $args->skin = "default";
     }
     if (!$args->colorset) {
         $args->colorset = "white";
     }
     if (!$args->editor_skin) {
         $args->editor_skin = "default";
     }
     // module Controller 객체 생성하여 입력
     $oModuleController =& getController('module');
     $output = $oModuleController->insertModuleConfig('communication', $args);
     return $output;
 }
开发者ID:hottaro,项目名称:xpressengine,代码行数:21,代码来源:communication.admin.controller.php

示例11: procSpamfilterAdminInsertConfig

 function procSpamfilterAdminInsertConfig()
 {
     // Get the default information
     $argsConfig = Context::gets('limits', 'check_trackback');
     $flag = Context::get('flag');
     //interval, limit_count
     if ($argsConfig->check_trackback != 'Y') {
         $argsConfig->check_trackback = 'N';
     }
     if ($argsConfig->limits != 'Y') {
         $argsConfig->limits = 'N';
     }
     // Create and insert the module Controller object
     $oModuleController =& getController('module');
     $moduleConfigOutput = $oModuleController->insertModuleConfig('spamfilter', $argsConfig);
     if (!$moduleConfigOutput->toBool()) {
         return $moduleConfigOutput;
     }
     $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispSpamfilterAdminSetting');
     $this->setRedirectUrl($returnUrl);
 }
开发者ID:relip,项目名称:xe-core,代码行数:21,代码来源:spamfilter.admin.controller.php

示例12: procCommunicationAdminInsertConfig

 /**
  * save configurations of the communication module
  * @return void|Object (success : void, fail : Object)
  **/
 function procCommunicationAdminInsertConfig()
 {
     // get the default information
     $args = Context::gets('skin', 'colorset', 'editor_skin', 'editor_colorset', 'mskin');
     if (!$args->skin) {
         $args->skin = 'default';
     }
     if (!$args->colorset) {
         $args->colorset = 'white';
     }
     if (!$args->editor_skin) {
         $args->editor_skin = 'default';
     }
     if (!$args->mskin) {
         $args->mskin = 'default';
     }
     // create the module module Controller object
     $oModuleController =& getController('module');
     $output = $oModuleController->insertModuleConfig('communication', $args);
     $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispCommunicationAdminConfig');
     return $this->setRedirectUrl($returnUrl, $output);
 }
开发者ID:relip,项目名称:xe-core,代码行数:26,代码来源:communication.admin.controller.php

示例13: procKrzipAdminInsertConfig

 /**
  * @brief Configuration
  **/
 function procKrzipAdminInsertConfig()
 {
     // Get the basic information
     $args = Context::gets('krzip_server_hostname', 'krzip_server_query');
     if (!$args->krzip_server_hostname) {
         $args->krzip_server_hostname = $this->hostname;
     }
     if (!$args->krzip_server_query) {
         $args->krzip_server_query = $this->query;
     }
     // Insert by creating the module Controller object
     $oModuleController = getController('module');
     $output = $oModuleController->insertModuleConfig('krzip', $args);
     if (!$output->toBool()) {
         return $output;
     }
     $this->setMessage('success_registed');
     if (Context::get('success_return_url')) {
         $this->setRedirectUrl(Context::get('success_return_url'));
     } else {
         $this->setRedirectUrl(getNotEncodedUrl('', 'module', 'krzip', 'act', 'dispKrzipAdminConfig'));
     }
 }
开发者ID:JeonJonguk,项目名称:Pull-Request-Test,代码行数:26,代码来源:krzip.admin.controller.php

示例14: procMemberAdminUpdateGroup

 /**
  * Update user group information
  * @return void|Object (void : success, Object : fail)
  */
 function procMemberAdminUpdateGroup()
 {
     $group_srl = Context::get('group_srl');
     $args = Context::gets('group_srl', 'title', 'description', 'is_default', 'image_mark');
     $args->site_srl = 0;
     $output = $this->updateGroup($args);
     if (!$output->toBool()) {
         return $output;
     }
     $this->add('group_srl', '');
     $this->add('page', Context::get('page'));
     $this->setMessage('success_updated');
     $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispMemberAdminGroupList');
     $this->setRedirectUrl($returnUrl);
 }
开发者ID:umjinsun12,项目名称:dngshin,代码行数:19,代码来源:member.admin.controller.php

示例15: procInstallCheckFtp

 function procInstallCheckFtp()
 {
     $ftp_info = Context::gets('ftp_user', 'ftp_password', 'ftp_port', 'sftp');
     $ftp_info->ftp_port = (int) $ftp_info->ftp_port;
     if (!$ftp_info->ftp_port) {
         $ftp_info->ftp_port = 21;
     }
     if (!$ftp_info->sftp) {
         $ftp_info->sftp = 'N';
     }
     if (!$ftp_info->ftp_user || !$ftp_info->ftp_password) {
         return new Object(-1, 'msg_safe_mode_ftp_needed');
     }
     if ($ftp_info->sftp == 'Y') {
         $connection = ssh2_connect('localhost', $ftp_info->ftp_port);
         if (!ssh2_auth_password($connection, $ftp_info->ftp_user, $ftp_info->ftp_password)) {
             return new Object(-1, 'msg_ftp_invalid_auth_info');
         }
     } else {
         require_once _XE_PATH_ . 'libs/ftp.class.php';
         $oFtp = new ftp();
         if (!$oFtp->ftp_connect('127.0.0.1', $ftp_info->ftp_port)) {
             return new Object(-1, sprintf(Context::getLang('msg_ftp_not_connected'), 'localhost'));
         }
         if (!$oFtp->ftp_login($ftp_info->ftp_user, $ftp_info->ftp_password)) {
             $oFtp->ftp_quit();
             return new Object(-1, 'msg_ftp_invalid_auth_info');
         }
         $oFtp->ftp_quit();
     }
     $this->setMessage('msg_ftp_connect_success');
 }
开发者ID:rubythonode,项目名称:xe-core,代码行数:32,代码来源:install.controller.php


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