You are here

public static function ClassUtils::getRealClass in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/doctrine/common/lib/Doctrine/Common/Util/ClassUtils.php \Doctrine\Common\Util\ClassUtils::getRealClass()

Gets the real class name of a class name that could be a proxy.

Parameters

string $class:

Return value

string

5 calls to ClassUtils::getRealClass()
AbstractClassMetadataFactory::getMetadataFor in vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php
Gets the class metadata descriptor for a class.
ClassUtils::getClass in vendor/doctrine/common/lib/Doctrine/Common/Util/ClassUtils.php
Gets the real class name of an object (even if its a proxy).
ClassUtils::getParentClass in vendor/doctrine/common/lib/Doctrine/Common/Util/ClassUtils.php
Gets the real parent class name of a class or object.
ClassUtils::newReflectionClass in vendor/doctrine/common/lib/Doctrine/Common/Util/ClassUtils.php
Creates a new reflection class.
ClassUtilsTest::testGetRealClass in vendor/doctrine/common/tests/Doctrine/Tests/Common/Util/ClassUtilsTest.php
@dataProvider dataGetClass

File

vendor/doctrine/common/lib/Doctrine/Common/Util/ClassUtils.php, line 40

Class

ClassUtils
Class and reflection related functionality for objects that might or not be proxy objects at the moment.

Namespace

Doctrine\Common\Util

Code

public static function getRealClass($class) {
  if (false === ($pos = strrpos($class, '\\' . Proxy::MARKER . '\\'))) {
    return $class;
  }
  return substr($class, $pos + Proxy::MARKER_LENGTH + 2);
}