Class LoggerUtils
Contains various helper methods.
Methods summary
public static
array
|
#
tokenizeClassName( string $name )
Splits a fully qualified class name into fragments delimited by the namespace
separator ().
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.
Parameters
Returns
array Class name split into fragments.
|
public static
|
#
shortenClassName( string $name, integer $length )
Attempts to shorten the given class name to the desired length.
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.
Parameters
- $name
string $name The (qualified) class name.
- $length
integer $length The length to shorten to. If null or 0 is given, the name will be
returned without shortening.
|