本文整理汇总了PHP中tx_rnbase::load方法的典型用法代码示例。如果您正苦于以下问题:PHP tx_rnbase::load方法的具体用法?PHP tx_rnbase::load怎么用?PHP tx_rnbase::load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tx_rnbase
的用法示例。
在下文中一共展示了tx_rnbase::load方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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;
}
示例2: 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;
}
示例3: 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();
}
示例4: createGoogleMap
/**
* Erstellt eine GoogleMap
*
* @param tx_rnbase_configurations $configurations
* @param string $confId
* @return tx_rnbase_maps_google_Map
*/
static function createGoogleMap(&$configurations, $confId)
{
$map = self::createMap('tx_rnbase_maps_google_Map', $configurations, $confId);
$keys = $configurations->getKeyNames($confId . 'poi.');
if (isset($keys)) {
tx_rnbase::load('tx_rnbase_maps_Util');
foreach ($keys as $key) {
$poi = $configurations->get($confId . 'poi.' . $key . '.');
$poi = tx_rnbase::makeInstance('tx_rnbase_maps_POI', $poi);
$bubble = tx_rnbase_maps_Util::createMapBubble($poi);
if (!$bubble) {
continue;
}
$bubble->setDescription($poi->getDescription());
// Prüfen, ob ein Icon konfiguriert ist
$iconConfId = $confId . 'poi.' . $key . '.icon.';
if ($configurations->get($iconConfId)) {
$icon = tx_rnbase::makeInstance('tx_rnbase_maps_google_Icon', $map);
$icon = new tx_rnbase_maps_google_Icon($map);
$image = $configurations->get($iconConfId . 'image', TRUE);
$icon->setImage($image, $configurations->getInt($iconConfId . 'image.file.maxW'), $configurations->getInt($iconConfId . 'image.file.maxH'));
$image = $configurations->get($iconConfId . 'shadow', TRUE);
$icon->setShadow($image, $configurations->getInt($iconConfId . 'shadow.file.maxW'), $configurations->getInt($iconConfId . 'shadow.file.maxH'));
$name = $configurations->get($iconConfId . 'name');
$icon->setName($name ? $name : tx_rnbase_util_Misc::createHash(array('name' => $image)));
$bubble->setIcon($icon);
}
$map->addMarker($bubble);
}
}
return $map;
}
示例5: 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;
}
示例6: loadConfig4BE
/**
* Lädt ein COnfigurations Objekt nach mit der TS aus der Extension
* Dabei wird alles geholt was in "plugin.tx_$extKey", "lib.$extKey." und
* "lib.links." liegt
*
* @param string $extKey Extension, deren TS Config geladen werden soll
* @param string $extKeyTS Extension, deren Konfig innerhalb der
* TS Config geladen werden soll.
* Es kann also zb. das TS von mklib geladen werden aber darin die konfig für
* das plugin von mkxyz
* @param string $sStaticPath pfad zum TS
* @param array $aConfig zusätzliche Konfig, die die default überschreibt
* @param boolean $resolveReferences sollen referenzen die in lib.
* und plugin.tx_$extKeyTS stehen aufgelöst werden?
* @param boolean $forceTsfePreparation
* @return tx_rnbase_configurations
*/
public static function loadConfig4BE($extKey, $extKeyTs = null, $sStaticPath = '', $aConfig = array(), $resolveReferences = false, $forceTsfePreparation = false)
{
$extKeyTs = is_null($extKeyTs) ? $extKey : $extKeyTs;
if (!$sStaticPath) {
$sStaticPath = '/static/ts/setup.txt';
}
if (file_exists(t3lib_div::getFileAbsFileName('EXT:' . $extKey . $sStaticPath))) {
t3lib_extMgm::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $extKey . $sStaticPath . '">');
}
tx_rnbase::load('tx_rnbase_configurations');
tx_rnbase::load('tx_rnbase_util_Misc');
$tsfePreparationOptions = array();
if ($forceTsfePreparation) {
$tsfePreparationOptions['force'] = true;
}
// Ist bei Aufruf aus BE notwendig! (@TODO: sicher???)
tx_rnbase_util_Misc::prepareTSFE($tsfePreparationOptions);
$GLOBALS['TSFE']->config = array();
$cObj = t3lib_div::makeInstance('tslib_cObj');
$pageTsConfig = self::getPagesTSconfig(0);
$tempConfig = $pageTsConfig['plugin.']['tx_' . $extKeyTs . '.'];
$tempConfig['lib.'][$extKeyTs . '.'] = $pageTsConfig['lib.'][$extKeyTs . '.'];
$tempConfig['lib.']['links.'] = $pageTsConfig['lib.']['links.'];
if ($resolveReferences) {
$GLOBALS['TSFE']->tmpl->setup['lib.'][$extKeyTs . '.'] = $tempConfig['lib.'][$extKeyTs . '.'];
$GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_' . $extKeyTs . '.'] = $pageTsConfig['plugin.']['tx_' . $extKeyTs . '.'];
}
$pageTsConfig = $tempConfig;
$qualifier = $pageTsConfig['qualifier'] ? $pageTsConfig['qualifier'] : $extKeyTs;
// möglichkeit die default konfig zu überschreiben
$pageTsConfig = t3lib_div::array_merge_recursive_overrule($pageTsConfig, $aConfig);
$configurations = new tx_rnbase_configurations();
$configurations->init($pageTsConfig, $cObj, $extKeyTs, $qualifier);
return $configurations;
}
示例7: getModels
private function getModels()
{
$models = array();
tx_rnbase::load('tx_rnbase_model_media');
$models[] = new tx_rnbase_model_media(array('uid' => 22, 'file_name' => 'file22.jpg'));
$models[] = new tx_rnbase_model_media(array('uid' => 33, 'file_name' => 'file33.jpg'));
return $models;
}
示例8: setUp
protected function setUp()
{
if (empty($GLOBALS['TCA']['tx_mklib_wordlist'])) {
tx_rnbase::load('tx_mklib_srv_Wordlist');
$GLOBALS['TCA']['tx_mklib_wordlist'] = tx_mklib_srv_Wordlist::getTca();
$GLOBALS['TCA']['tx_mklib_wordlist']['test'] = TRUE;
}
}
示例9: getSearcher
/**
* Liefert den Searcher
*
* @return tx_rnbase_util_SearchBase
*/
protected function getSearcher()
{
tx_rnbase::load('tx_rnbase_util_SearchBase');
$searcher = tx_rnbase_util_SearchBase::getInstance($this->getSearchClass());
if (!$searcher instanceof tx_rnbase_util_SearchBase) {
throw new Exception(get_class($this) . '->getSearchClass() has to return a classname' . ' of class which extends tx_rnbase_util_SearchBase!');
}
return $searcher;
}
示例10: setUp
/**
* (non-PHPdoc)
* @see PHPUnit_Framework_TestCase::setUp()
*/
protected function setUp()
{
tx_rnbase::load('tx_rnbase_util_Misc');
tx_rnbase_util_Misc::prepareTSFE(array('force' => TRUE));
//tq_seo extension hat einen hook der auf das folgende feld zugreift.
//wenn dieses nicht da ist bricht der test mit einer php warnung ab, was
//wir verhindern wollen!
$GLOBALS['TSFE']->rootLine[0]['uid'] = 1;
}
示例11: setUp
/**
* (non-PHPdoc)
* @see PHPUnit_Framework_TestCase::setUp()
*/
protected function setUp()
{
//es kann sein dass die TCA von der wordlist nicht geladen wurde.
//also stellen wir die TCA hier bereit
tx_rnbase::load('tx_mklib_srv_Wordlist');
global $TCA;
$TCA['tx_mklib_wordlist'] = tx_mklib_srv_Wordlist::getTca();
$this->returnUrlBackup = $_GET['returnUrl'];
}
示例12: 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;
}
示例13: getExtensionValue
/**
* Liefert einen Wert aus der Extension-Konfiguration.
* Gibt es für die angegebene Extension keine Konfiguration,
* wird als Fallback der Wert von mklib zurückgegeben.
*
* @param string $sValueKey
* @param string $sExtKey
* @param boolean $bFallback
* @return mixed
*/
public static function getExtensionValue($sValueKey, $sExtKey = 'mklib', $bFallback = false)
{
if (!$sExtKey) {
$sExtKey = 'mklib';
}
tx_rnbase::load('tx_rnbase_configurations');
$mValue = tx_rnbase_configurations::getExtensionCfgValue($sExtKey, $sValueKey);
if ($bFallback && $mValue === false && $sExtKey != 'mklib') {
$mValue = tx_rnbase_configurations::getExtensionCfgValue('mklib', $sValueKey);
}
return $mValue;
}
示例14: getPlayer
function getPlayer($media, $conf)
{
$mediaName = $media['file_name'];
$mediaPath = $media['file_path'];
// Die genaue Konfig holen wir für den Dateityp
$fileType = $media['file_type'];
$playerConf = $conf[$fileType . '.']['player.'];
$color = $playerConf['backgroundColor'];
$autoStart = $playerConf['autoStart'];
$autoReplay = $playerConf['autoReplay'];
tx_rnbase::load('tx_rnbase_util_Extensions');
$fePath = tx_rnbase_util_Extensions::siteRelPath('rn_base') . 'sv1/';
$out = '<object type="application/x-shockwave-flash" data="/' . $fePath . 'dewplayer.swf?son=' . $mediaPath . $mediaName . '&autostart=' . $autoStart . '&autoreplay=' . $autoReplay . '&bgcolor=' . $color . '" width="200" height="20"><param name="movie" value="/' . $fePath . 'dewplayer.swf?son=' . $mediaPath . $mediaName . '&autostart=' . $autoStart . '&autoreplay=' . $autoReplay . '&bgcolor=' . $color . '" />' . $media['title'] . '</object>';
return $out;
}
示例15: sendXajaxResponse
/**
* Liefert
*
* @param string $cmd
* @return tx_xajax_response
*/
public function sendXajaxResponse($cmd)
{
t3lib_div::_GETset($cmd, 'PM');
//@TODO: ist $this->PA immer gleich? mehrere treeviews beachten
tx_rnbase::load('tx_mklib_treelib_TreeView');
$oTreeView = tx_mklib_treelib_TreeView::makeInstance($this->PA, $this->oTceForm);
tx_rnbase::load('tx_mklib_treelib_Renderer');
$oRenderer = tx_mklib_treelib_Renderer::makeInstance($this->PA, $this->oTceForm);
$sContent = $oRenderer->getBrowsableTree($oTreeView);
// ajax response erstellen
/* @var $objResponse tx_xajax_response */
$objResponse = tx_rnbase::makeInstance('tx_xajax_response');
$objResponse->addAssign($oTreeView->treeName . '-tree-div', 'innerHTML', $sContent);
return $objResponse;
}