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

PHP tx_rnbase类代码示例

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

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



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

示例1: handleException

 /**
  * Interne Verarbeitung der Exception
  *
  * @param string $actionName
  * @param Exception $e
  * @param tx_rnbase_configurations $configurations
  *
  * @return string error message
  */
 public function handleException($actionName, Exception $e, tx_rnbase_configurations $configurations)
 {
     // wir prüfen erst mal, ob die exception gefangen werden soll
     $catch = $this->catchException($actionName, $e, $configurations);
     if ($catch !== NULL) {
         return $catch;
     }
     // wenn nicht senden wir ggf den header
     if ($this->send503HeaderOnException($configurations)) {
         header('HTTP/1.1 503 Service Unavailable');
     }
     // wir loggen nun den fehler
     tx_rnbase::load('tx_rnbase_util_Logger');
     if (tx_rnbase_util_Logger::isFatalEnabled()) {
         $extKey = $configurations->getExtensionKey();
         $extKey = $extKey ? $extKey : 'rn_base';
         tx_rnbase_util_Logger::fatal('Fatal error for action ' . $actionName, $extKey, array('Exception' => array('message' => $e->getMessage(), 'code' => $e->getCode(), 'file' => $e->getFile(), 'line' => $e->getLine(), 'trace' => $e->getTraceAsString()), '_GET' => $_GET, '_POST' => $_POST));
     }
     // wir senden eine fehlermail
     $addr = tx_rnbase_configurations::getExtensionCfgValue('rn_base', 'sendEmailOnException');
     if ($addr) {
         tx_rnbase_util_Misc::sendErrorMail($addr, $actionName, $e);
     }
     // Now message for FE
     $ret = $this->getErrorMessage($actionName, $e, $configurations);
     return $ret;
 }
开发者ID:RocKordier,项目名称:rn_base,代码行数:36,代码来源:class.tx_rnbase_exception_Handler.php


示例2: testGetExtensionCfgValue

 public function testGetExtensionCfgValue()
 {
     $GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['dummyExtension'] = serialize(array('testConfig' => 'testConfigValue'));
     $extensionConfiguration = tx_rnbase::makeInstance('tx_mklib_util_ExtensionConfigurationTest');
     $testConfigValue = $extensionConfiguration->getTestConfig();
     $this->assertEquals('testConfigValue', $testConfigValue);
 }
开发者ID:RocKordier,项目名称:typo3-mklib,代码行数:7,代码来源:class.tx_mklib_tests_util_ExtensionConfiguration_testcase.php


示例3: getCurrentItem

 /**
  * Die dazu das aktuelle item für eine Detailseite zu holen bzw dieses zurückzusetzen.
  * Dazu muss den Linker einfach folgendes für den action namen liefern: "show" + den eigentlichen key.
  * 
  * Dann brauch man in der Detailansicht noch einen Button nach folgendem Schema:
  * $markerArray['###NEWSEARCHBTN###'] = $formTool->createSubmit('showHowTo[clear]', '###LABEL_BUTTON_BACK###'); 
  * 
  * @param string $key
  * @param tx_rnbase_mod_IModule $module
  * 
  * @return tx_rnbase_model_base
  */
 public static function getCurrentItem($key, tx_rnbase_mod_IModule $module)
 {
     $itemid = 0;
     $data = t3lib_div::_GP('show' . $key);
     if ($data) {
         list($itemid, ) = each($data);
     }
     $dataKey = 'current' . $key;
     if ($itemid === 'clear') {
         $data = t3lib_BEfunc::getModuleData(array($dataKey => ''), array($dataKey => '0'), $module->getName());
         return false;
     }
     // Daten mit Modul abgleichen
     $changed = $itemid ? array($dataKey => $itemid) : array();
     $data = t3lib_BEfunc::getModuleData(array($dataKey => ''), $changed, $module->getName());
     $itemid = $data[$dataKey];
     if (!$itemid) {
         return false;
     }
     $modelData = explode('|', $itemid);
     $item = tx_rnbase::makeInstance($modelData[0], $modelData[1]);
     if (!$item->isValid()) {
         $item = null;
         //auf null setzen damit die Suche wieder angezeigt wird
     }
     return $item;
 }
开发者ID:RocKordier,项目名称:typo3-mklib,代码行数:39,代码来源:class.tx_mklib_mod1_util_Helper.php


示例4: getCObj

 /**
  * Returns an instanceof tslib_cObj or \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer.
  * Since this object has functions for database access and frontend your ControllerAction
  * should always provide cObj for model and view. This ensures only one instance per request.
  *
  * @return an instance of \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer or tslib_cObj
  */
 function getCObj()
 {
     if (!$this->cObject) {
         $this->cObject = tx_rnbase::makeInstance(tx_rnbase_util_Typo3Classes::getContentObjectRendererClass());
     }
     return $this->cObject;
 }
开发者ID:RocKordier,项目名称:rn_base,代码行数:14,代码来源:class.tx_rnbase_action_Base.php


示例5: testGeneratorReturnsCorrectPlainTextWhenNoInfoTable

 /**
  * Prüft ob korrekter text zurück erzeugt wird
  * Das umfasst auch Sonderzeichen
  */
 public function testGeneratorReturnsCorrectPlainTextWhenNoInfoTable()
 {
     $aParams = array('defaultFontFace' => 0, 'defaultFontSize' => 22, 'paperOrientation' => 1, 'rtfVersion' => 1);
     $oRTFGenerator = tx_rnbase::makeInstance('tx_mklib_util_RTFGenerator', $aParams);
     $sRTFText = $oRTFGenerator->getRTF('###SPECIALCHAR_(###<strong>Das ist ein schöner Testtext.</strong> Auch mit ###SPECIALCHAR_)### verschiedenen ßonderzeichen und Ähnlichem. Sogar einem ###SPECIALCHAR_*###');
     $this->assertEquals('{\\rtf1\\ansi\\deff0{\\fonttbl{\\f0\\fcharset0\\fnil Arial;}{\\f1\\fcharset0\\fnil Wingdings;}}{\\f0\\fs22\\dn0 }{\\f1\\fs25\\dn0 (}{\\f0\\fs22\\dn0}{\\b\\f0\\fs22\\dn0 Das ist ein sch\\\'f6ner Testtext. }{\\f0\\fs22\\dn0 Auch mit }{\\f1\\fs25\\dn0 )}{\\f0\\fs22\\dn0 verschiedenen \\\'dfonderzeichen und \\\'c4hnlichem. Sogar einem }{\\f1\\fs25\\dn0 *}{\\f0\\fs22\\dn0}}', $sRTFText, 'Der generierte Text ist falsch.');
 }
开发者ID:RocKordier,项目名称:typo3-mklib,代码行数:11,代码来源:class.tx_mklib_tests_util_RTFGenerator_testcase.php


示例6: fillPath

 /**
  * Befüllt den Record Pfaden
  *
  * @param string $sPath
  * @return tx_mklib_model_Dam
  */
 public function fillPath($sPath = false)
 {
     // Pathname immer setzen!
     if (!$this->hasFilePath()) {
         if (tx_rnbase_util_TYPO3::isTYPO60OrHigher()) {
             $this->setFilePathName($this->getUrl());
         } else {
             $this->setFilePathName($this->getFilePath() . $this->getFileName());
         }
     }
     tx_rnbase::load('tx_mklib_util_File');
     // webpath setzen
     if ((!$sPath || $sPath == 'webpath') && !$this->hasFileWebpath()) {
         $this->setFileWebpath(tx_mklib_util_File::getWebPath($this->getFilePathName()));
     }
     // serverpath setzen
     if ((!$sPath || $sPath == 'serverpath') && !$this->hasFileServerpath()) {
         $this->setFileServerpath(tx_mklib_util_File::getServerPath($this->getFilePathName()));
     }
     // relpath setzen
     if ((!$sPath || $sPath == 'relpath') && !$this->hasFileRelpath()) {
         $this->setFileRelpath(tx_mklib_util_File::getRelPath($this->getFilePathName()));
     }
     return $this;
 }
开发者ID:RocKordier,项目名称:typo3-mklib,代码行数:31,代码来源:class.tx_mklib_model_Media.php


示例7: getDamDB

 private static function getDamDB()
 {
     if (!self::$damDb) {
         self::$damDb = tx_rnbase::makeInstance('tx_dam_db');
     }
     return self::$damDb;
 }
开发者ID:RocKordier,项目名称:rn_base,代码行数:7,代码来源:class.tx_rnbase_util_MediaMarker.php


示例8: send45

 protected function send45()
 {
     /* @var $mail TYPO3\CMS\Core\Mail\MailMessage */
     $mail = tx_rnbase::makeInstance(tx_rnbase_util_Typo3Classes::getMailMessageClass());
     $mail->setFrom(array($this->from => $this->fromName));
     $mail->setTo(tx_rnbase_util_Strings::trimExplode(',', $this->toAsString));
     $mail->setSubject($this->subject);
     if ($this->replyTo) {
         $mail->addReplyTo($this->replyTo, $this->replyToName);
     }
     // Or set it after like this
     if ($this->htmlPart) {
         $mail->setBody($this->htmlPart, 'text/html');
     }
     // Add alternative parts with addPart()
     if ($this->textPart) {
         $mail->addPart($this->textPart, 'text/plain');
     }
     if (!empty($this->attachments)) {
         foreach ($this->attachments as $attachment) {
             if (!$mail->attach(Swift_Attachment::fromPath($attachment['src']))) {
                 tx_rnbase_util_Logger::warn('Adding attachment failed!', 'rn_base', array('subject' => $mail->subject, 'to' => $this->toAsString, 'attachment' => $attachment));
             }
         }
     }
     $mail->send();
 }
开发者ID:RocKordier,项目名称:rn_base,代码行数:27,代码来源:class.tx_rnbase_util_Mail.php


示例9: getConfig

 private function getConfig($confArr)
 {
     $cObj = tx_rnbase::makeInstance(tx_rnbase_util_Typo3Classes::getContentObjectRendererClass());
     $configurations = tx_rnbase::makeInstance('tx_rnbase_configurations');
     $configurations->init($confArr, $cObj, 'tx_rnbase', 'rnbase');
     return $configurations;
 }
开发者ID:RocKordier,项目名称:rn_base,代码行数:7,代码来源:class.tx_rnbase_tests_listbuilder_testcase.php


示例10: execute

 /**
  * Function executed from the Scheduler.
  * Sends an email
  *
  * @return	boolean
  */
 public function execute()
 {
     $success = TRUE;
     $taskId = $this->taskUid;
     tx_rnbase::load('tx_rnbase_util_Misc');
     try {
         $lastRun = $this->getLastRunTime($taskId);
         /* @var $srv tx_mklog_srv_WatchDog */
         $srv = tx_rnbase_util_Misc::getService('mklog', 'WatchDog');
         $filters = array();
         $options = array();
         $options['minimalSeverity'] = $this->getMinimalSeverity();
         $options['forceSummaryMail'] = $this->getForceSummaryMail();
         $options['includeDataVar'] = $this->getIncludeDataVar();
         //damit jede Nachricht nur einmal kommt, auch wenn sie mehrmals vorhanden ist
         if ($this->getGroupEntries()) {
             $options['groupby'] = Tx_Mklog_Utility_Devlog::getMessageFieldName() . ',extkey';
             // wir wollen aber wissen wie oft jede Nachricht vorhanden ist
             $options['count'] = TRUE;
         }
         $srv->triggerMails($this->getEmailReceiver(), $lastRun, $filters, $options);
         $this->updateLastRunTime($taskId);
     } catch (Exception $e) {
         tx_rnbase_util_Logger::fatal('WatchDog failed!', 'mklog', array('Exception' => $e->getMessage()));
         $success = FALSE;
     }
     return $success;
 }
开发者ID:DMKEBUSINESSGMBH,项目名称:typo3-mklog,代码行数:34,代码来源:class.tx_mklog_scheduler_WatchDog.php


示例11: getCurrency

 /**
  * @return 	tx_mklib_model_Currency
  */
 public function getCurrency()
 {
     tx_rnbase::load('tx_mklib_model_Currency');
     //@TODO: aktuellen Code auslesen und übergeben,
     //		return tx_mklib_model_Currency::getByCountry();
     return tx_mklib_model_Currency::getByCurrencyCode();
 }
开发者ID:RocKordier,项目名称:typo3-mklib,代码行数:10,代码来源:class.tx_mklib_srv_Finance.php


示例12: init

 /**
  * Init object
  *
  * @param 	tx_rnbase_mod_IModule $mod
  * @param 	array $options
  * @param 	string $sSelector
  */
 protected function init(tx_rnbase_mod_IModule $mod, $options, $sSelector = 'tx_mklib_mod1_util_Selector')
 {
     $this->options = $options;
     $this->mod = $mod;
     $this->formTool = $mod->getFormTool();
     $this->selector = tx_rnbase::makeInstance($sSelector);
     $this->selector->init($mod);
 }
开发者ID:RocKordier,项目名称:typo3-mklib,代码行数:15,代码来源:class.tx_mklib_mod1_searcher_Base.php


示例13: __construct

 /**
  */
 public function __construct()
 {
     /** @var TcaDatabaseRecord $formDataGroup */
     $formDataGroup = tx_rnbase::makeInstance('TYPO3\\CMS\\Backend\\Form\\FormDataGroup\\TcaDatabaseRecord');
     $this->formDataCompiler = tx_rnbase::makeInstance('TYPO3\\CMS\\Backend\\Form\\FormDataCompiler', $formDataGroup);
     $this->nodeFactory = tx_rnbase::makeInstance('TYPO3\\CMS\\Backend\\Form\\NodeFactory');
     $this->formResultCompiler = tx_rnbase::makeInstance('TYPO3\\CMS\\Backend\\Form\\FormResultCompiler');
 }
开发者ID:RocKordier,项目名称:rn_base,代码行数:10,代码来源:FormBuilder.php


示例14: includeLocalLang

 /**
  * @return tx_rnbase_util_Lang
  */
 private function includeLocalLang()
 {
     $llFile = $this->getLLFile();
     /* @var $lang tx_rnbase_util_Lang */
     $lang = tx_rnbase::makeInstance('tx_rnbase_util_Lang');
     $lang->loadLLFile($llFile);
     return $lang;
 }
开发者ID:RocKordier,项目名称:rn_base,代码行数:11,代码来源:class.tx_rnbase_util_Wizicon.php


示例15: testMakeLink

 public function testMakeLink()
 {
     $oLinker = tx_rnbase::makeInstance('tx_mklib_tests_fixtures_classes_DummyLinker');
     $oModel = tx_rnbase::makeInstance('tx_rnbase_model_base', 1);
     $oModel->uid = 1;
     $oFormTool = tx_rnbase::makeInstance('tx_rnbase_util_FormTool');
     $this->assertEquals('<input type="submit" name="showTest[tx_rnbase_model_base|1]" value="" />', $oLinker->makeLink($oModel, $oFormTool), 'Fsclher Link.');
 }
开发者ID:RocKordier,项目名称:typo3-mklib,代码行数:8,代码来源:class.tx_mklib_tests_mod1_linker_Base_testcase.php


示例16: buildList

 /**
  * erzeugt eine Liste von Dateien.
  *
  * @param 	string 							$template
  * @param 	tx_mkdownloads_model_Download 	$item
  * @param 	tx_rnbase_util_FormatUtil 		$formatter
  * @param 	string 							$confId
  * @param 	string 							$marker
  * @return 	string
  */
 public static function buildList($aRecords, $template, &$formatter, $confId, $marker)
 {
     if (!self::containsMarker($template, $marker . 'S')) {
         return $template;
     }
     $listBuilder = tx_rnbase::makeInstance('tx_rnbase_util_ListBuilder');
     $template = $listBuilder->render($aRecords, $formatter->getConfigurations()->getViewData(), $template, 'tx_mklib_marker_MediaRecord', $confId, $marker, $formatter);
     return $template;
 }
开发者ID:RocKordier,项目名称:typo3-mklib,代码行数:19,代码来源:class.tx_mklib_marker_MediaRecord.php


示例17: testUniqueModelArray

 public function testUniqueModelArray()
 {
     $aArray = array(tx_rnbase::makeInstance('tx_rnbase_model_base', array('uid' => 5, 'name' => 'Model Nr. 5')), tx_rnbase::makeInstance('tx_rnbase_model_base', array('uid' => 6, 'name' => 'Model Nr. 6')), tx_rnbase::makeInstance('tx_rnbase_model_base', array('uid' => 5, 'name' => 'Model Nr. 5')), tx_rnbase::makeInstance('tx_rnbase_model_base', array('uid' => 2, 'name' => 'Model Nr. 2')));
     $aUnique = tx_mklib_util_Model::uniqueModels($aArray);
     $this->assertTrue(is_array($aUnique), 'No array given.');
     $this->assertEquals(count($aUnique), 3, 'Array has a wrong count of entries.');
     $this->assertArrayHasKey(2, $aUnique, 'Model with uid 2 not found');
     $this->assertArrayHasKey(5, $aUnique, 'Model with uid 5 not found');
     $this->assertArrayHasKey(6, $aUnique, 'Model with uid 6 not found');
 }
开发者ID:RocKordier,项目名称:typo3-mklib,代码行数:10,代码来源:class.tx_mklib_tests_util_Model_testcase.php


示例18: getCacheImpl

 /**
  * Returns the cache instance
  *
  * @param string $name
  * @return tx_rnbase_cache_ICache
  */
 private static function getCacheImpl($name)
 {
     if (tx_rnbase_util_TYPO3::isTYPO62OrHigher()) {
         return tx_rnbase::makeInstance('tx_rnbase_cache_TYPO3Cache62', $name);
     } elseif (tx_rnbase_util_TYPO3::isTYPO60OrHigher()) {
         return tx_rnbase::makeInstance('tx_rnbase_cache_TYPO3Cache60', $name);
     } elseif (tx_rnbase_util_TYPO3::isTYPO46OrHigher()) {
         return tx_rnbase::makeInstance('tx_rnbase_cache_TYPO3Cache46', $name);
     }
     return tx_rnbase::makeInstance('tx_rnbase_cache_TYPO3Cache', $name);
 }
开发者ID:RocKordier,项目名称:rn_base,代码行数:17,代码来源:class.tx_rnbase_cache_Manager.php


示例19: createOutput

 /**
  * Erstellen des Frontend-Outputs
  */
 function createOutput($template, &$viewData, &$configurations, &$formatter)
 {
     $confId = $this->getController()->getConfId();
     // Die ViewData bereitstellen
     $item = $viewData->offsetGet('item');
     $itemPath = $this->getItemPath($configurations, $confId);
     $markerClass = $this->getMarkerClass($configurations, $confId);
     $marker = tx_rnbase::makeInstance($markerClass);
     $out = $marker->parseTemplate($template, $item, $formatter, $confId . $itemPath . '.', strtoupper($itemPath));
     return $out;
 }
开发者ID:RocKordier,项目名称:rn_base,代码行数:14,代码来源:class.tx_rnbase_view_Single.php


示例20: validate

 /**
  * Validiert einen PLZ-String für ein Land.
  * @param tx_mklib_interface_IZipCountry $land
  * @param string $zip
  * @return boolean
  */
 public static function validate(tx_mklib_interface_IZipCountry $country, $zip)
 {
     $result = true;
     switch ($country->getZipRule()) {
         case 0:
             // no rule set
             $result = true;
             tx_rnbase::load('tx_rnbase_util_Logger');
             if (tx_rnbase_util_Logger::isNoticeEnabled()) {
                 tx_rnbase_util_Logger::notice('No zip rule for country defined.', 'mklib', array('zip' => $zip, 'getISO2' => $country->getISO2(), 'getZipLength' => $country->getZipLength(), 'getZipRule' => $country->getZipRule()));
             }
             break;
         case 1:
             // maximum length without gaps
             $result = self::validateMaxLengthWG($country, $zip);
             break;
         case 2:
             // maximum length numerical without gaps
             $result = self::validateMaxLengthNumWG($country, $zip);
             break;
         case 3:
             // exact length without gaps
             $result = self::validateLengthWG($country, $zip);
             break;
         case 4:
             // exact length numerical without gaps
             $result = self::validateLengthNumWG($country, $zip);
             break;
         case 5:
             // maximum length with gaps
             $result = self::validateMaxLength($country, $zip);
             break;
         case 6:
             // maximum length numerical with gaps
             $result = self::validateMaxLengthNum($country, $zip);
             break;
         case 7:
             // exact length with gaps
             $result = self::validateLength($country, $zip);
             break;
         case 8:
             // exact length numerical with gaps
             $result = self::validateLengthNum($country, $zip);
             break;
         case 9:
             // special rules
             $result = self::validateSpecial($country, $zip);
             break;
         default:
             $result = false;
             break;
     }
     return $result;
 }
开发者ID:RocKordier,项目名称:typo3-mklib,代码行数:60,代码来源:class.tx_mklib_validator_ZipCode.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP type类代码示例发布时间:2022-05-23
下一篇:
PHP tsmText类代码示例发布时间: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