src/BaseException.php
public static function getShortName($fqn){

		$fqn_parts = explode('\\', $fqn);
		$final = array_pop($fqn_parts);

		if(empty($fqn_parts)){

			return $final;
		}

		$fqn_caps = preg_replace('/[a-z]+/', '', $fqn_parts);

		return implode('\\', $fqn_caps) . '\\' . $final;

	}
public static function getShortName($fqn){

		$fqn_parts = explode('\\', $fqn);
		$final = array_pop($fqn_parts);

		if(empty($fqn_parts)){

			return $final;
		}

		$fqn_caps = preg_replace('/[a-z]+/', '', $fqn_parts);

		return implode('\\', $fqn_caps) . '\\' . $final;

	}
public static function getShortName ( $ fqn ) { $ fqn_parts = explode ( '\\' , $ fqn ) ; $ final = array_pop ( $ fqn_parts ) ; if ( empty ( $ fqn_parts ) ) { return $ final ; } $ fqn_caps = preg_replace ( '/[a-z]+/' , '' , $ fqn_parts ) ; return implode ( '\\' , $ fqn_caps ) . '\\' . $ final ; }
Get the "short" version of a fully-qualified class name.

<p>This method compresses the namespace part of a fully-qualified class
name to only capital letters (so, "StudyPortals\Framework" becomes
"SP\F"). The "actual" class name is left untouched.<br>
This creates short, but still readable, class names (including their
namespace) for use in places were space is limited (c.q. console errors,
file names and lines with many class names).</p>

@param string $fqn

@return string
Get the short version of a fully - qualified class name .