You are here

public function StaticReflectionService::getClassShortName in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/StaticReflectionService.php \Doctrine\Common\Persistence\Mapping\StaticReflectionService::getClassShortName()

Returns the shortname of a class.

Parameters

string $class:

Return value

string

Overrides ReflectionService::getClassShortName

File

vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/StaticReflectionService.php, line 40

Class

StaticReflectionService
PHP Runtime Reflection Service.

Namespace

Doctrine\Common\Persistence\Mapping

Code

public function getClassShortName($className) {
  if (strpos($className, '\\') !== false) {
    $className = substr($className, strrpos($className, "\\") + 1);
  }
  return $className;
}