public function StaticReflectionService::getClassNamespace

Return the namespace of a class.

Parameters

string $className:

Return value

string

Overrides ReflectionService::getClassNamespace

File

drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/StaticReflectionService.php, line 63

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;
}