function test_logger()
 {
     if (tx_rnbase_util_Extensions::isLoaded('devlog')) {
         $minLog = tx_rnbase_configurations::getExtensionCfgValue('devlog', 'minLogLevel');
         if ($minLog === FALSE) {
             $ret = tx_rnbase_util_Logger::isNoticeEnabled();
             $this->assertTrue($ret, 'Notice funktioniert nicht.');
         }
         if ($minLog == 1) {
             $ret = tx_rnbase_util_Logger::isNoticeEnabled();
             $this->assertTrue($ret, 'Notice funktioniert nicht.');
             $ret = tx_rnbase_util_Logger::isWarningEnabled();
             $this->assertTrue($ret, 'Warning funktioniert nicht.');
             $ret = tx_rnbase_util_Logger::isFatalEnabled();
             $this->assertTrue($ret, 'Fatal funktioniert nicht.');
             $ret = tx_rnbase_util_Logger::isInfoEnabled();
             $this->assertFalse($ret, 'Info funktioniert nicht.');
             $ret = tx_rnbase_util_Logger::isDebugEnabled();
             $this->assertFalse($ret, 'Debug funktioniert nicht.');
         }
         if ($minLog == 3) {
             $ret = tx_rnbase_util_Logger::isNoticeEnabled();
             $this->assertFalse($ret, 'Notice funktioniert nicht.');
             $ret = tx_rnbase_util_Logger::isWarningEnabled();
             $this->assertFalse($ret, 'Warning funktioniert nicht.');
             $ret = tx_rnbase_util_Logger::isFatalEnabled();
             $this->assertTrue($ret, 'Fatal funktioniert nicht.');
             $ret = tx_rnbase_util_Logger::isInfoEnabled();
             $this->assertFalse($ret, 'Info funktioniert nicht.');
             $ret = tx_rnbase_util_Logger::isDebugEnabled();
             $this->assertFalse($ret, 'Debug funktioniert nicht.');
         }
     }
 }
 /**
  * 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;
 }
 /**
  * Is logging enabled?
  *
  * @param 	string 	$tablename
  * @return 	boolean
  */
 private static function isLog($tablename)
 {
     if (self::$log == -1) {
         // erst die Extension Konfiguration fragen!
         tx_rnbase::load('tx_rnbase_configurations');
         self::$log = intval(tx_rnbase_configurations::getExtensionCfgValue('mklib', 'logDbHandler'));
         if (self::$log) {
             tx_rnbase::load('tx_rnbase_util_Logger');
             self::$log = tx_rnbase_util_Logger::isNoticeEnabled();
         }
     }
     if (self::$log) {
         // ignore tables besorgen
         if (!is_array(self::$ignoreTables)) {
             self::$ignoreTables = t3lib_div::trimExplode(',', tx_rnbase_configurations::getExtensionCfgValue('mklib', 'logDbIgnoreTables'), true);
         }
         // tabelle loggen ?
         if (in_array($tablename, self::$ignoreTables)) {
             return false;
         }
     }
     return self::$log;
 }