• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP regedit类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: registerEvent

		/**
		* Зарегистрировать событие в истории событий
		* @param string $eventTypeId идентификатор типа события
		* @param array $params массив параметров события
		* @param int $elementId id связанной страницы
		* @param int $objectId id связанного объекта
		*/
		public function registerEvent($eventTypeId, $params = array(), $elementId = null, $objectId = null) {
			
			$pool = ConnectionPool::getInstance();
			$connection = $pool->getConnection();
			umiEventFeed::setConnection($connection);
			umiEventFeedType::setConnection($connection);
					
			try {
				$eventType = umiEventFeedType::get($eventTypeId);
			} catch (Exception $e) {
				$eventType = umiEventFeedType::create($eventTypeId);
			}
			
			$userId = permissionsCollection::getInstance()->getUserId();
			$user = umiObjectsCollection::getInstance()->getObject($userId)->getName();
			
			$module = cmsController::getInstance()->getModule('users');
			$link = $module->getObjectEditLink($userId);
			
			array_unshift($params, $user);
			array_unshift($params, $link);
			umiEventFeed::create($eventType, $params, $elementId, $objectId);
			
			$maxDays = (int) regedit::getInstance()->getVal("//modules/events/max-days-storing-events");
			if ($maxDays > 0) {
				$lastDate = time() - ($maxDays * 24 * 60 * 60);
				umiEventFeed::deleteList(array(), $lastDate);
			}
			
		}
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:37,代码来源:class.php


示例2: config

		public function config() {
			$regedit = regedit::getInstance();

			$params = Array(
				"config" => Array(
					"int:per_page" => NULL,
					"boolean:confirm_user_answer" => NULL
				)
			);

			$mode = getRequest("param0");

			if($mode == "do") {
				$params = $this->expectParams($params);
				$regedit->setVar("//modules/faq/per_page", $params['config']['int:per_page']);
				$regedit->setVar("//modules/faq/confirm_user_answer", $params['config']['boolean:confirm_user_answer']);
				$this->chooseRedirect();
			}

			$params['config']['int:per_page'] = (int) $regedit->getVal("//modules/faq/per_page");
			$params['config']['boolean:confirm_user_answer'] = (int) $regedit->getVal("//modules/faq/confirm_user_answer");

			$this->setDataType("settings");
			$this->setActionType("modify");

			$data = $this->prepareData($params, "settings");

			$this->setData($data);
			return $this->doData();
		}
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:30,代码来源:__admin.php


示例3: banners_list

 public function banners_list()
 {
     //Deprecated method
     $regedit = regedit::getInstance();
     $regedit->setVar("//modules/banners/default_method_admin", "lists");
     $this->redirect($this->pre_lang . "/admin/banners/lists/");
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:7,代码来源:__banners.php


示例4: detectFilters

 static function detectFilters(selector $v8be74552df93e31bbdd6b36ed74bdb6a)
 {
     if ($v8be74552df93e31bbdd6b36ed74bdb6a->mode == 'pages') {
         $ve4e46deb7f9cc58c7abfb32e5570b6f3 = (array) getRequest('domain_id');
         foreach ($ve4e46deb7f9cc58c7abfb32e5570b6f3 as $v72ee76c5c29383b7c9f9225c1fa4d10b) {
             $v8be74552df93e31bbdd6b36ed74bdb6a->where('domain')->equals($v72ee76c5c29383b7c9f9225c1fa4d10b);
         }
         $v5a05866850c28651fe234659f6c92ada = (array) getRequest('lang_id');
         foreach ($v5a05866850c28651fe234659f6c92ada as $vf585b7f018bb4ced15a03683a733e50b) {
             $v8be74552df93e31bbdd6b36ed74bdb6a->where('lang')->equals($vf585b7f018bb4ced15a03683a733e50b);
         }
     }
     if ($v8be74552df93e31bbdd6b36ed74bdb6a->mode == 'pages' && sizeof($v8be74552df93e31bbdd6b36ed74bdb6a->types) && is_array(getRequest('rel')) && regedit::getInstance()->getVal('//modules/comments')) {
         $v8be74552df93e31bbdd6b36ed74bdb6a->types('hierarchy-type')->name('comments', 'comment');
     }
     if (isset($_REQUEST['hierarchy_types'])) {
         $vc7fcb1af65c062d638abb298ceddb52b = (array) $_REQUEST['hierarchy_types'];
         foreach ($vc7fcb1af65c062d638abb298ceddb52b as $v9e3669d19b675bd57058fd4664205d2a) {
             $v9e3669d19b675bd57058fd4664205d2a = explode('-', $v9e3669d19b675bd57058fd4664205d2a);
             if (sizeof($v9e3669d19b675bd57058fd4664205d2a) == 2) {
                 $v8be74552df93e31bbdd6b36ed74bdb6a->types('hierarchy-type')->name($v9e3669d19b675bd57058fd4664205d2a[0], $v9e3669d19b675bd57058fd4664205d2a[1]);
             }
         }
     }
     self::detectHierarchyFilters($v8be74552df93e31bbdd6b36ed74bdb6a);
     self::detectWhereFilters($v8be74552df93e31bbdd6b36ed74bdb6a);
     self::detectOrderFilters($v8be74552df93e31bbdd6b36ed74bdb6a);
     self::checkSyncParams($v8be74552df93e31bbdd6b36ed74bdb6a);
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:29,代码来源:helper.php


示例5: paymentCheckStep

 public function paymentCheckStep(order $order, $step)
 {
     if ($step == 'address' && !regedit::getInstance()->getVal('//modules/emarket/enable-delivery') || $step == 'bonus' && !customer::get()->bonus) {
         return false;
     }
     return $step;
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:7,代码来源:__payments.php


示例6: onAddTopicToDispatch

 public function onAddTopicToDispatch(iUmiEventPoint $oEvent)
 {
     $iDispatchId = regedit::getInstance()->getVal("//modules/forum/dispatch_id");
     if (!$iDispatchId) {
         return false;
     }
     $dispatches_module = cmsController::getInstance()->getModule('dispatches');
     if (!$dispatches_module) {
         return false;
     }
     $iTopicId = (int) $oEvent->getParam('topic_id');
     $oTopicElement = umiHierarchy::getInstance()->getElement($iTopicId);
     if ($oTopicElement instanceof umiHierarchyElement) {
         $sTitle = (string) getRequest('title');
         $sMessage = (string) getRequest('body');
         $iHierarchyTypeId = umiHierarchyTypesCollection::getInstance()->getTypeByName("dispatches", "message")->getId();
         $iMsgTypeId = umiObjectTypesCollection::getInstance()->getTypeByHierarchyTypeId($iHierarchyTypeId);
         $oMsgType = umiObjectTypesCollection::getInstance()->getType($iMsgTypeId);
         $iMsgObjId = umiObjectsCollection::getInstance()->addObject($sTitle, $iMsgTypeId);
         $oMsgObj = umiObjectsCollection::getInstance()->getObject($iMsgObjId);
         if ($oMsgObj instanceof umiObject) {
             $iReleaseId = $dispatches_module->getNewReleaseInstanceId($iDispatchId);
             $oMsgObj->setValue('release_reference', $iReleaseId);
             $oMsgObj->setValue('header', $sTitle);
             $oMsgObj->setValue('body', $sMessage);
             $oMsgObj->commit();
             return true;
         } else {
             return false;
         }
     } else {
         return false;
     }
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:34,代码来源:__sysevents.php


示例7: partialReindex

		public function partialReindex() {
			$this->setDataType("settings");
			$this->setActionType("view");

			$lastId = (int) getRequest("lastId");
			$search = searchModel::getInstance();
			
			$total = (int) $search->getAllIndexablePages();
			$limit = regedit::getInstance()->getVal("//modules/search/one_iteration_index");
			if ($limit==0) {
				$limit = 5;
			}
			$result = $search->index_all($limit, $lastId);
			
			$data = Array(
				'index-status' => Array(
					'attribute:current' => $result['current'],
					'attribute:total' => $total,
					'attribute:lastId' => $result['lastId']
				)
			);

			$this->setData($data);
			return $this->doData();
		}
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:25,代码来源:__admin.php


示例8: renderDeliveryAddressesList

 public function renderDeliveryAddressesList(order $order, $template = 'default')
 {
     list($tpl_block, $tpl_item) = def_module::loadTemplates("emarket/delivery/{$template}", 'delivery_address_block', 'delivery_address_item');
     $customer = customer::get();
     $addresses = $customer->delivery_addresses;
     $items_arr = array();
     $currentDeliveryId = $order->getValue('delivery_address');
     $collection = umiObjectsCollection::getInstance();
     if (is_array($addresses)) {
         foreach ($addresses as $address) {
             $addressObject = $collection->getObject($address);
             $item_arr = array('attribute:id' => $address, 'attribute:name' => $addressObject->name);
             if ($address == $currentDeliveryId) {
                 $item_arr['attribute:active'] = 'active';
                 $item_arr['void:checked'] = 'checked="checked" ';
             } else {
                 $item_arr['void:checked'] = '';
             }
             $items_arr[] = def_module::parseTemplate($tpl_item, $item_arr, false, $address);
         }
     }
     $types = umiObjectTypesCollection::getInstance();
     $typeId = $types->getBaseType("emarket", "delivery_address");
     $block_arr = array('attribute:type-id' => $typeId, 'attribute:type_id' => $typeId, 'xlink:href' => 'udata://data/getCreateForm/' . $typeId, 'subnodes:items' => $items_arr);
     $regedit = regedit::getInstance();
     if ((bool) $regedit->getVal('//modules/emarket/delivery-with-address')) {
         $block_arr['delivery'] = $this->renderDeliveryList($order, $template, true);
     } else {
         $block_arr['void:delivery'] = '';
     }
     return def_module::parseTemplate($tpl_block, $block_arr);
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:32,代码来源:__delivery.php


示例9: __construct

	public function __construct() {
		parent::__construct();

		if(cmsController::getInstance()->getCurrentMode() == "admin") {

			$configTabs = $this->getConfigTabs();
			if ($configTabs) {
				$configTabs->add("config");
				$configTabs->add("rss_list");
				$configTabs->add("subjects");
			}

			$this->__loadLib("__admin.php");
			$this->__implement("__news");

			$this->__loadLib("__subjects.php");
			$this->__implement("__subjects_news");

			$this->__loadLib("__custom_adm.php");
			$this->__implement("__custom_adm_news");
		} else {
			$this->__loadLib("__custom.php");
			$this->__implement("__custom_news");

			$this->per_page = regedit::getInstance()->getVal("//modules/news/per_page");
		}

		$this->__loadLib("__rss_import.php");
			$this->__implement("__rss_import_news");
	}
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:30,代码来源:class.php


示例10: loadEventListeners

 protected function loadEventListeners()
 {
     $v6c63406410aa57b3c97b88d3feb09990 = regedit::getInstance()->getList("//modules");
     foreach ($v6c63406410aa57b3c97b88d3feb09990 as $v47c80780ab608cc046f2a6e6f071feb6) {
         $v22884db148f0ffb0d830ba431102b0b5 = $v47c80780ab608cc046f2a6e6f071feb6[0];
         $this->loadModuleEventListeners($v22884db148f0ffb0d830ba431102b0b5);
     }
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:8,代码来源:umiEventsController.php


示例11: ch_remove_illegal_module

function ch_remove_illegal_module($module_name)
{
    if (!trim($module_name, " \r\n\t\\/")) {
        return;
    }
    $regedit = regedit::getInstance();
    $regedit->delVar("//modules/{$module_name}");
    //ch_remove_dir("./classes/modules/{$module_name}/");
}
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:9,代码来源:ch_m.php


示例12: security

 public function security()
 {
     $regedit = regedit::getInstance();
     $params = array('test' => array());
     $this->setDataType("settings");
     $this->setActionType("modify");
     $data = $this->prepareData($params, "settings");
     $this->setData($data);
     return $this->doData();
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:10,代码来源:__security.php


示例13: __construct

 public function __construct()
 {
     parent::__construct();
     if (cmsController::getInstance()->getCurrentMode() == "admin") {
         $this->__loadLib("__admin.php");
         $this->__implement("__search");
     } else {
         $this->__loadLib("__custom.php");
         $this->__implement("__custom_search");
         $this->per_page = regedit::getInstance()->getVal("//modules/search/per_page");
     }
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:12,代码来源:class.php


示例14: confirmUserAnswer

 public function confirmUserAnswer($oElement)
 {
     $bConfirmUserAnswer = (bool) regedit::getInstance()->getVal("//modules/faq/confirm_user_answer");
     if (!$bConfirmUserAnswer) {
         return true;
     }
     if ($oElement instanceof umiHierarchyElement && $oElement->getIsActive()) {
         $iAuthorId = $oElement->getValue("author_id");
         $author_name = "";
         $author_email = "";
         $oAuthor = umiObjectsCollection::getInstance()->getObject($iAuthorId);
         if ($oAuthor instanceof umiObject) {
             $author_user = null;
             if ($oAuthor->getValue("is_registrated")) {
                 $user_id = $oAuthor->getValue("user_id");
                 $author_user = umiObjectsCollection::getInstance()->getObject($user_id);
             }
             if ($author_user instanceof umiObject) {
                 // author user
                 $author_name = $author_user->getValue("lname") . " " . $author_user->getValue("fname");
                 $author_email = $author_user->getValue("e-mail");
             } else {
                 // author guest
                 $author_name = $oAuthor->getValue("nickname");
                 $author_email = $oAuthor->getValue("email");
             }
         }
         if (umiMail::checkEmail($author_email)) {
             list($sMailSubject, $sMailBody) = def_module::loadTemplatesForMail("faq/default", "answer_mail_subj", "answer_mail");
             $block_arr = array();
             $block_arr['domain'] = $sDomain = $_SERVER['HTTP_HOST'];
             $block_arr['element_id'] = $iElementId = $oElement->getId();
             $block_arr['author_id'] = $oElement->getValue("author_id");
             $bOldFHStatus = umiHierarchy::getInstance()->forceAbsolutePath(true);
             $block_arr['question_link'] = umiHierarchy::getInstance()->getPathById($iElementId);
             umiHierarchy::getInstance()->forceAbsolutePath($bOldFHStatus);
             $block_arr['ticket'] = $iElementId;
             $sSubject = def_module::parseTemplateForMail($sMailSubject, $block_arr, $iElementId);
             $sBody = def_module::parseTemplateForMail($sMailBody, $block_arr, $iElementId);
             $from = regedit::getInstance()->getVal("//settings/fio_from");
             $from_email = regedit::getInstance()->getVal("//settings/email_from");
             $oMail = new umiMail();
             $oMail->addRecipient($author_email);
             $oMail->setFrom($from_email, $from);
             $oMail->setSubject($sSubject);
             $oMail->setContent($sBody);
             $oMail->commit();
         }
     }
     return true;
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:51,代码来源:__event_handlers.php


示例15: backup_copies

 /**
  * TODO PHPDoc
  * Enter description here ...
  */
 public function backup_copies()
 {
     $regedit = regedit::getInstance();
     $backupDir = str_replace(CURRENT_WORKING_DIR, '', SYS_MANIFEST_PATH) . 'backup/';
     $params = array("snapshots" => array("status:backup-directory" => $backupDir));
     $ent = getRequest('ent');
     if (!$ent) {
         $ent = time();
         $this->redirect($this->pre_lang . '/admin/backup/backup_copies/?ent=' . $ent);
     }
     $this->setDataType("settings");
     $this->setActionType("modify");
     $data = $this->prepareData($params, "settings");
     $this->setData($data);
     return $this->doData();
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:20,代码来源:__admin.php


示例16: mail_config

 public function mail_config()
 {
     $regedit = regedit::getInstance();
     $domains = domainsCollection::getInstance()->getList();
     $params = array();
     $params['status-notifications'] = array('boolean:no-order-status-notification' => $regedit->getVal('//modules/emarket/no-order-status-notification'), 'boolean:no-payment-status-notification' => $regedit->getVal('//modules/emarket/no-payment-status-notification'), 'boolean:no-delivery-status-notification' => $regedit->getVal('//modules/emarket/no-delivery-status-notification'));
     foreach ($domains as $domain) {
         $domain_id = $domain->getId();
         $domain_name = $domain->getHost();
         $seo_info = array();
         $seo_info['status:domain'] = $domain_name;
         if ($domain->getIsDefault() && !$regedit->getVal("//modules/emarket/from-email/{$domain_id}") && !$regedit->getVal("//modules/emarket/from-name/{$domain_id}") && !$regedit->getVal("//modules/emarket/manager-email/{$domain_id}")) {
             $seo_info['string:email-' . $domain_id] = $regedit->getVal("//modules/emarket/from-email");
             $seo_info['string:name-' . $domain_id] = $regedit->getVal("//modules/emarket/from-name");
             $seo_info['string:manageremail-' . $domain_id] = $regedit->getVal("//modules/emarket/manager-email");
         } else {
             $seo_info['string:email-' . $domain_id] = $regedit->getVal("//modules/emarket/from-email/{$domain_id}");
             $seo_info['string:name-' . $domain_id] = $regedit->getVal("//modules/emarket/from-name/{$domain_id}");
             $seo_info['string:manageremail-' . $domain_id] = $regedit->getVal("//modules/emarket/manager-email/{$domain_id}");
         }
         $params[$domain_name] = $seo_info;
     }
     $mode = (string) getRequest('param0');
     if ($mode == "do") {
         $params = $this->expectParams($params);
         foreach ($domains as $domain) {
             $domain_id = $domain->getId();
             $domain_name = $domain->getHost();
             $email = $params[$domain_name]['string:email-' . $domain_id];
             $name = $params[$domain_name]['string:name-' . $domain_id];
             $manageremail = $params[$domain_name]['string:manageremail-' . $domain_id];
             $regedit->setVar("//modules/emarket/from-email/{$domain_id}", $email);
             $regedit->setVar("//modules/emarket/from-name/{$domain_id}", $name);
             $regedit->setVar("//modules/emarket/manager-email/{$domain_id}", $manageremail);
         }
         $regedit->setVar('//modules/emarket/no-order-status-notification', $params['status-notifications']['boolean:no-order-status-notification']);
         $regedit->setVar('//modules/emarket/no-payment-status-notification', $params['status-notifications']['boolean:no-payment-status-notification']);
         $regedit->setVar('//modules/emarket/no-delivery-status-notification', $params['status-notifications']['boolean:no-delivery-status-notification']);
         $this->chooseRedirect();
     }
     $this->setDataType('settings');
     $this->setActionType('modify');
     $data = $this->prepareData($params, 'settings');
     $this->setData($data);
     return $this->doData();
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:46,代码来源:__admin.php


示例17: cronUnpublishPage

 public function cronUnpublishPage($oEvent)
 {
     $object_type = umiObjectTypesCollection::getInstance()->getTypeByGUID('root-pages-type');
     $field_id = $object_type->getFieldId("expiration_date");
     $sel = new umiSelection();
     $sel->addPropertyFilterLess($field_id, time());
     $sel->addPropertyFilterNotEqual($field_id, 0);
     $sel->addActiveFilter(true);
     $sel->forceHierarchyTable(true);
     $result = umiSelectionsParser::runSelection($sel);
     $res = array();
     foreach ($result as $key => $page_id) {
         $ePage = umiHierarchy::getInstance()->getElement($page_id, true);
         $ePage->setIsActive(false);
         $pageObject = $ePage->getObject();
         $pageObject->setValue("publish_status", $this->getPageStatusIdByStatusSid("page_status_unpublish"));
         $pageObject->commit();
         $ePage->commit();
         if (!($publishComments = $ePage->getValue("publish_comments"))) {
             $publishComments = "Отсутствуют.";
         }
         $user_id = $ePage->getObject()->getOwnerId();
         $oUser = umiObjectsCollection::getInstance()->getObject($user_id);
         if ($oUser instanceof umiObject && ($user_email = $oUser->getValue("e-mail"))) {
             //Составляем и посылаем сообщение пользователю
             $mail_message = new umiMail();
             $from = regedit::getInstance()->getVal("//settings/email_from");
             $mail_message->setFrom($from);
             $mail_message->setPriorityLevel("high");
             $mail_message->setSubject(getLabel('label-notification-expired-mail-header'));
             list($body) = def_module::loadTemplatesForMail("mail/expired", "body");
             $block['notify_header'] = getLabel('label-notification-expired-mail-header');
             $block['page_header'] = $ePage->getName();
             $block['publish_comments'] = $publishComments;
             $domain = domainsCollection::getInstance()->getDomain($ePage->getDomainId());
             $page_host = "http://" . $domain->getHost() . umiHierarchy::getInstance()->getPathById($page_id);
             $block['page_link'] = $page_host;
             $mail_html = def_module::parseTemplateForMail($body, $block, $page_id);
             $mail_message->addRecipient($user_email);
             $mail_message->setContent($mail_html);
             $mail_message->commit();
             $mail_message->send();
         }
     }
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:45,代码来源:__events.php


示例18: __construct

 public function __construct()
 {
     parent::__construct();
     // Если режим работы admin
     if (cmsController::getInstance()->getCurrentMode() == "admin") {
         // Добавление вкладок (config стандартная вкладка)
         $configTabs = $this->getConfigTabs();
         if ($configTabs) {
             $configTabs->add("config");
         }
         // Подгрузить библиотеку __admin.php и класс __modulelements
         $this->__loadLib("__admin.php");
         $this->__implement("__modulelements");
     } else {
         // Получить из реестра значение per_page
         $this->per_page = regedit::getInstance()->getVal("//modules/modulelements/per_page");
     }
 }
开发者ID:tomoonshine,项目名称:postsms,代码行数:18,代码来源:class.php


示例19: onCronSyncCurrency

		public function onCronSyncCurrency(iUmiEventPoint $event) {
			$regedit = regedit::getInstance();
			if(!$regedit->getVal('//modules/emarket/enable-currency')) return false;
			
			$config = mainConfiguration::getInstance();
			$sourceUrl = $config->get('modules', 'emarket.currency.sync.source');
			$xslPath = CURRENT_WORKING_DIR .'/xsl/currencies/' . $config->get('modules', 'emarket.currency.sync.xsl');
			
			$originalXml = umiRemoteFileGetter::get($sourceUrl);
			if(function_exists('mb_detect_encoding') && (mb_detect_encoding($originalXml, "UTF-8, ISO-8859-1, GBK, CP1251") != "UTF-8")) {
				$originalXml = iconv ("CP1251", "UTF-8", $originalXml);
				$originalXml = preg_replace("/(encoding=\"windows-1251\")/i", "encoding=\"UTF-8\"", $originalXml);
			}
			
			$xslt = new xsltProcessor;
			$dom = new DomDocument();
			$dom->loadXML($originalXml);
			$xslt->importStyleSheet(DomDocument::load($xslPath));
			$resultXml = $xslt->transformToXML($dom);
			$tmpPath = SYS_CACHE_RUNTIME . 'tmpcurrencies.xml';
			file_put_contents($tmpPath, $resultXml);
			
			$currenciesList = new baseXmlConfig($tmpPath);
			$currencies = $currenciesList->getList('/Exchange/Exchange_Rates', array (
				'code'		=> '/New_Country',
				'rate'		=> '/Rate',
				'nominal'	=> '/Nominal'
			));
			
			foreach($currencies as $currencyInfo) {
				$code = getArrayKey($currencyInfo, 'code');
				
				try {
					if($currency = $this->getCurrency($code)) {
						$currency->nominal = getArrayKey($currencyInfo, 'nominal');
						$currency->rate = getArrayKey($currencyInfo, 'rate');
						$currency->commit();
					}
				} catch(privateException $e) {}
			}
			
			unlink($tmpPath);
		}
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:43,代码来源:__events.php


示例20: import_old_blogs

 public function import_old_blogs()
 {
     // Initializing collections
     $hierarchyTypesCollection = umiHierarchyTypesCollection::getInstance();
     $typesCollection = umiObjectTypesCollection::getInstance();
     $hierarchy = umiHierarchy::getInstance();
     $objects = umiObjectsCollection::getInstance();
     // Loading types info
     $blog20HType = $hierarchyTypesCollection->getTypeByName('blogs20', 'blog');
     $blog20Type = $typesCollection->getType($typesCollection->getTypeByHierarchyTypeId($blog20HType->getId()));
     $blog20PostHType = $hierarchyTypesCollection->getTypeByName('blogs20', 'post');
     $blog20PostType = $typesCollection->getType($typesCollection->getTypeByHierarchyTypeId($blog20PostHType->getId()));
     $blog20CommentHType = $hierarchyTypesCollection->getTypeByName('blogs20', 'comment');
     $blog20CommentType = $typesCollection->getType($typesCollection->getTypeByHierarchyTypeId($blog20CommentHType->getId()));
     $blogHType = $hierarchyTypesCollection->getTypeByName('blogs', 'blog');
     $blogType = $typesCollection->getType($typesCollection->getTypeByHierarchyTypeId($blogHType->getId()));
     $blogPostHType = $hierarchyTypesCollection->getTypeByName('blogs', 'blog_message');
     $blogPostType = $typesCollection->getType($typesCollection->getTypeByHierarchyTypeId($blogHType->getId()));
     $blogCommentHType = $hierarchyTypesCollection->getTypeByName('blogs', 'blog_comment');
     $blogCommentType = $typesCollection->getType($typesCollection->getTypeByHierarchyTypeId($blogHType->getId()));
     // Collecting all blogs
     $selection = new umiSelection();
     $selection->addElementType($blogHType->getId());
     $blogList = umiSelectionsParser::runSelection($selection);
     // Processing each blog
     foreach ($blogList as $blogId) {
         $blog = $hierarchy->getElement($blogId, true, false);
         $newBlogId = $this->makeElementFromExisting($blogId, $blog->getRel(), $blog20HType->getId(), array('content' => 'description', 'prvlist_friends' => 'friendlist'));
         $selection = new umiSelection();
         $selection->addElementType($blogPostHType->getId());
         $selection->addHierarchyFilter($blogId);
         $postList = umiSelectionsParser::runSelection($selection);
         foreach ($postList as $postId) {
             $newPostId = $this->makeElementFromExisting($postId, $newBlogId, $blog20PostHType->getId());
             $this->import_comments($postId, $newPostId, $blogCommentHType->getId(), $blog20CommentHType->getId());
         }
     }
     regedit::getInstance()->setVar("//modules/blogs20/import/old", 1);
     $this->chooseRedirect(getServer('HTTP_REFERER'));
     return null;
     // Never pass into here
 }
开发者ID:BGCX261,项目名称:zimmerli-svn-to-git,代码行数:42,代码来源:__import.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP registrarForm类代码示例发布时间:2022-05-23
下一篇:
PHP reduxCoreEnqueue类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap