class ClassUtils (View source)

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

Methods

static string
getRealClass(string $class)

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

static string
getClass(object $object)

Gets the real class name of an object (even if its a proxy).

static string
getParentClass(string $className)

Gets the real parent class name of a class or object.

static ReflectionClass
newReflectionClass(string $class)

Creates a new reflection class.

static ReflectionClass
newReflectionObject(object $object)

Creates a new reflection object.

static string
generateProxyClassName(string $className, string $proxyNamespace)

Given a class name and a proxy namespace returns the proxy name.

Details

static string getRealClass(string $class)

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

Parameters

string $class

Return Value

string

static string getClass(object $object)

Gets the real class name of an object (even if its a proxy).

Parameters

object $object

Return Value

string

static string getParentClass(string $className)

Gets the real parent class name of a class or object.

Parameters

string $className

Return Value

string

static ReflectionClass newReflectionClass(string $class)

Creates a new reflection class.

Parameters

string $class

Return Value

ReflectionClass

static ReflectionClass newReflectionObject(object $object)

Creates a new reflection object.

Parameters

object $object

Return Value

ReflectionClass

static string generateProxyClassName(string $className, string $proxyNamespace)

Given a class name and a proxy namespace returns the proxy name.

Parameters

string $className
string $proxyNamespace

Return Value

string