You are here

public function StaticReflectionService::getClassNamespace 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::getClassNamespace()

Parameters

string $class:

Return value

string

Overrides ReflectionService::getClassNamespace

File

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

Class

StaticReflectionService
PHP Runtime Reflection Service.

Namespace

Doctrine\Common\Persistence\Mapping

Code

public function getClassNamespace($className) {
  $namespace = '';
  if (strpos($className, '\\') !== false) {
    $namespace = strrev(substr(strrev($className), strpos(strrev($className), '\\') + 1));
  }
  return $namespace;
}