Class LoggerUtils

Description

Contains various helper methods.

  • since: 2.3

Located in /log4php/helpers/LoggerUtils.php (line 28)


	
			
Method Summary
static void shortenClassName (string $name, integer $length)
static array tokenizeClassName (string $name)
Methods
static method shortenClassName (line 69)

Attempts to shorten the given class name to the desired length.

This is done by separating the class name into fragments (delimited by \ or .) and trimming individual fragments, starting with the left, until desired length has been reached.

The final fragment (i.e. class name) will never be shortened so the result may still be longer than given length.

  • access: public
static void shortenClassName (string $name, integer $length)
  • string $name: The (qualified) class name.
  • integer $length: The length to shorten to. If null or 0 is given, the name will be returned without shortening.
static method tokenizeClassName (line 41)

Splits a fully qualified class name into fragments delimited by the namespace separator (\).

For backward compatibility, a dot (.) can be used as a delimiter as well.

  • return: Class name split into fragments.
  • access: public
static array tokenizeClassName (string $name)
  • string $name

Documentation generated on Tue, 12 Mar 2024 14:04:55 +0900 by phpDocumentor 1.4.4