當前位置: 首頁>>代碼示例>>PHP>>正文


PHP def_module::noRedirectOnPanic方法代碼示例

本文整理匯總了PHP中def_module::noRedirectOnPanic方法的典型用法代碼示例。如果您正苦於以下問題:PHP def_module::noRedirectOnPanic方法的具體用法?PHP def_module::noRedirectOnPanic怎麽用?PHP def_module::noRedirectOnPanic使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在def_module的用法示例。


在下文中一共展示了def_module::noRedirectOnPanic方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: importObjects

 protected function importObjects(umiObjectType $v726e8e4809d4c1b28a6549d86436a124)
 {
     $v4340fd73e75df7a9d9e45902a59ba3a4 = $this->readNextRow();
     $this->fields = count($v4340fd73e75df7a9d9e45902a59ba3a4);
     $v5891da2d64975cae48d175d1e001f5da = umiObjectsCollection::getInstance();
     $vd14a8022b085f9ef19d479cbdd581127 = umiObjectTypesCollection::getInstance();
     $v9367a975f19a06750b67f719f4f08ceb = false;
     if ($v726e8e4809d4c1b28a6549d86436a124->getId() == $vd14a8022b085f9ef19d479cbdd581127->getTypeIdByGUID('dispatches-subscriber')) {
         $v9367a975f19a06750b67f719f4f08ceb = true;
     }
     $v7f2db423a49b305459147332fb01cf87 = outputBuffer::current();
     def_module::$noRedirectOnPanic = true;
     $v4340fd73e75df7a9d9e45902a59ba3a4 = $this->analyzeHeaders($v726e8e4809d4c1b28a6549d86436a124, $v4340fd73e75df7a9d9e45902a59ba3a4);
     $v76cf1d4ff412fd3cb644aa58a53c78dc = array();
     while ($v07d43db2a74336dcfbdaeeeffe6f7a19 = $this->readNextRow()) {
         echo str_repeat(' ', 1024);
         flush();
         $v07d43db2a74336dcfbdaeeeffe6f7a19 = $this->analyzeColumns($v4340fd73e75df7a9d9e45902a59ba3a4, $v07d43db2a74336dcfbdaeeeffe6f7a19);
         if (!isset($v07d43db2a74336dcfbdaeeeffe6f7a19['id'])) {
             continue;
         }
         $v16b2b26000987faccb260b9d39df1269 = $v07d43db2a74336dcfbdaeeeffe6f7a19['id'];
         if ($v9367a975f19a06750b67f719f4f08ceb && !$v16b2b26000987faccb260b9d39df1269) {
             $v8be74552df93e31bbdd6b36ed74bdb6a = new selector('objects');
             $v8be74552df93e31bbdd6b36ed74bdb6a->types('object-type')->name('dispatches', 'subscriber');
             $v8be74552df93e31bbdd6b36ed74bdb6a->where('name')->equals($v07d43db2a74336dcfbdaeeeffe6f7a19['name']);
             $v8be74552df93e31bbdd6b36ed74bdb6a->option('return')->value('id');
             $result = $v8be74552df93e31bbdd6b36ed74bdb6a->first;
             if (is_array($result) && count($result)) {
                 $v16b2b26000987faccb260b9d39df1269 = $result['id'];
             }
         }
         if ($v16b2b26000987faccb260b9d39df1269) {
             $vccae550f37edb4e56f3bf01df9953a6f = $v16b2b26000987faccb260b9d39df1269;
             $v53cc4db543d7a569e51c1d76ac6f278e = 'systemModifyObject';
         } else {
             $v53cc4db543d7a569e51c1d76ac6f278e = 'systemCreateObject';
             $v16b2b26000987faccb260b9d39df1269 = $v5891da2d64975cae48d175d1e001f5da->addObject('Temporary object name', $v726e8e4809d4c1b28a6549d86436a124->getId());
             $v7f2db423a49b305459147332fb01cf87->push('//Create new object "' . $v07d43db2a74336dcfbdaeeeffe6f7a19['name'] . '" of type ' . $v726e8e4809d4c1b28a6549d86436a124->getId() . ', id #' . $v16b2b26000987faccb260b9d39df1269 . "\n");
             $vccae550f37edb4e56f3bf01df9953a6f = 'new';
         }
         $va8cfde6331bd59eb2ac96f8911c4b666 = $v5891da2d64975cae48d175d1e001f5da->getObject($v16b2b26000987faccb260b9d39df1269);
         if ($va8cfde6331bd59eb2ac96f8911c4b666 instanceof umiObject == false) {
             $v76cf1d4ff412fd3cb644aa58a53c78dc[] = array('id' => $v16b2b26000987faccb260b9d39df1269, 'error' => getLabel('csv-error-not-found'), 'name' => $v07d43db2a74336dcfbdaeeeffe6f7a19['name']);
             continue;
         }
         if ($va8cfde6331bd59eb2ac96f8911c4b666->getTypeId() != $v726e8e4809d4c1b28a6549d86436a124->getId()) {
             $v76cf1d4ff412fd3cb644aa58a53c78dc[] = array('id' => $v16b2b26000987faccb260b9d39df1269, 'error' => getLabel('csv-error-wrong-type'), 'name' => $v07d43db2a74336dcfbdaeeeffe6f7a19['name']);
             continue;
         }
         $vd05b6ed7d2345020440df396d6da7f73 = umiFieldsCollection::getInstance();
         $_REQUEST['data'][$vccae550f37edb4e56f3bf01df9953a6f] = array();
         foreach ($v4340fd73e75df7a9d9e45902a59ba3a4 as $v865c0c0b4ab0e063e5caa3387c1a8741 => $v46b9e6004c49d9cc040029c197cab278) {
             if ($v865c0c0b4ab0e063e5caa3387c1a8741 == 'id') {
                 continue;
             }
             if ($v865c0c0b4ab0e063e5caa3387c1a8741 == 'name' && isset($v07d43db2a74336dcfbdaeeeffe6f7a19[$v865c0c0b4ab0e063e5caa3387c1a8741])) {
                 $_REQUEST['name'] = $v07d43db2a74336dcfbdaeeeffe6f7a19[$v865c0c0b4ab0e063e5caa3387c1a8741];
             }
             if (isset($v07d43db2a74336dcfbdaeeeffe6f7a19[$v865c0c0b4ab0e063e5caa3387c1a8741])) {
                 $_REQUEST['data'][$vccae550f37edb4e56f3bf01df9953a6f][$v865c0c0b4ab0e063e5caa3387c1a8741] = $v07d43db2a74336dcfbdaeeeffe6f7a19[$v865c0c0b4ab0e063e5caa3387c1a8741];
             }
         }
         if ($v726e8e4809d4c1b28a6549d86436a124->getMethod() == 'user') {
             $_REQUEST['data'][$vccae550f37edb4e56f3bf01df9953a6f]['password'][0] = 'dummyPassword';
         }
         try {
             $v4119639092e62c55ea8be348e4d9260d = new umiEventPoint($v53cc4db543d7a569e51c1d76ac6f278e);
             $v4119639092e62c55ea8be348e4d9260d->addRef("object", $va8cfde6331bd59eb2ac96f8911c4b666);
             $v4119639092e62c55ea8be348e4d9260d->setMode("before");
             $v4119639092e62c55ea8be348e4d9260d->call();
         } catch (errorPanicException $ve1671797c52e15f763380b45e841ec32) {
             $v76cf1d4ff412fd3cb644aa58a53c78dc[] = array('id' => $vccae550f37edb4e56f3bf01df9953a6f, 'error' => $ve1671797c52e15f763380b45e841ec32->getMessage(), 'name' => $v07d43db2a74336dcfbdaeeeffe6f7a19['name']);
             if ($vccae550f37edb4e56f3bf01df9953a6f == 'new') {
                 $v5891da2d64975cae48d175d1e001f5da->delObject($v16b2b26000987faccb260b9d39df1269);
             }
             continue 1;
         }
         foreach ($v07d43db2a74336dcfbdaeeeffe6f7a19 as $v972bf3f05d14ffbdb817bef60638ff00 => $v2063c1608d6e0baf80249c42e2be5804) {
             switch ($v972bf3f05d14ffbdb817bef60638ff00) {
                 case 'id':
                     continue;
                 case 'name':
                     $va8cfde6331bd59eb2ac96f8911c4b666->setName($v2063c1608d6e0baf80249c42e2be5804);
                     break;
                 default:
                     try {
                         $this->modifyProperty($va8cfde6331bd59eb2ac96f8911c4b666, $v972bf3f05d14ffbdb817bef60638ff00, $v2063c1608d6e0baf80249c42e2be5804);
                     } catch (fieldRestrictionException $ve1671797c52e15f763380b45e841ec32) {
                         $v76cf1d4ff412fd3cb644aa58a53c78dc[] = array('id' => $vccae550f37edb4e56f3bf01df9953a6f, 'error' => $ve1671797c52e15f763380b45e841ec32->getMessage(), 'name' => $v07d43db2a74336dcfbdaeeeffe6f7a19[$v972bf3f05d14ffbdb817bef60638ff00]);
                     }
                     break;
             }
         }
         $va8cfde6331bd59eb2ac96f8911c4b666->commit();
         try {
             $v4119639092e62c55ea8be348e4d9260d->setMode('after');
             $v4119639092e62c55ea8be348e4d9260d->call();
         } catch (errorPanicException $ve1671797c52e15f763380b45e841ec32) {
             $v76cf1d4ff412fd3cb644aa58a53c78dc[] = array('id' => $vccae550f37edb4e56f3bf01df9953a6f, 'error' => $ve1671797c52e15f763380b45e841ec32->getMessage(), 'name' => $v07d43db2a74336dcfbdaeeeffe6f7a19['name']);
//.........這裏部分代碼省略.........
開發者ID:BGCX261,項目名稱:zimmerli-svn-to-git,代碼行數:101,代碼來源:quickCsvImporter.php


注:本文中的def_module::noRedirectOnPanic方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。