original_string: protected static function get_preference_definition($preferencename) {
          self::fill_preferences_cache();
  
          foreach (self::$preferencescache as $key => $preference) {
              if (empty($preference['isregex'])) {
                  if ($key === $preferencename) {
                      return $preference;
                  }
              } else {
                  if (preg_match($key, $preferencename)) {
                      return $preference;
                  }
              }
          }
  
          throw new coding_exception('Invalid preference requested.');
      }
code: protected static function get_preference_definition($preferencename) {
          self::fill_preferences_cache();
  
          foreach (self::$preferencescache as $key => $preference) {
              if (empty($preference['isregex'])) {
                  if ($key === $preferencename) {
                      return $preference;
                  }
              } else {
                  if (preg_match($key, $preferencename)) {
                      return $preference;
                  }
              }
          }
  
          throw new coding_exception('Invalid preference requested.');
      }
code_tokens: protected static function get_preference_definition ( $ preferencename ) { self :: fill_preferences_cache ( ) ; foreach ( self :: $ preferencescache as $ key => $ preference ) { if ( empty ( $ preference [ 'isregex' ] ) ) { if ( $ key === $ preferencename ) { return $ preference ; } } else { if ( preg_match ( $ key , $ preferencename ) ) { return $ preference ; } } } throw new coding_exception ( 'Invalid preference requested.' ) ; }
docstring: Retrieves the preference definition
  
  @param string $preferencename
  @return array
docstring_tokens: Retrieves the preference definition