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)

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

static string
getClass(object $object)

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

static string
getParentClass(string $className)

Get the real parent class name of a class or object

static ReflectionClass
newReflectionClass(string $class)

Create a new reflection class

static ReflectionObject
newReflectionObject(object $object)

Create a new reflection object

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

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

Details

static string getRealClass(string $class)

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

Parameters

string $class

Return Value

string

static string getClass(object $object)

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

Parameters

object $object

Return Value

string

static string getParentClass(string $className)

Get the real parent class name of a class or object

Parameters

string $className

Return Value

string

static ReflectionClass newReflectionClass(string $class)

Create a new reflection class

Parameters

string $class

Return Value

ReflectionClass

static ReflectionObject newReflectionObject(object $object)

Create a new reflection object

Parameters

object $object

Return Value

ReflectionObject

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

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

Parameters

string $className
string $proxyNamespace

Return Value

string