0
我有一个依赖其他对象的对象实例,在PHP中获取对象相关性
$objA = new Some_Class();
$objB = new Other_Class();
$objC = new Another_One();
$objA->property = new stdClass;
$objB->key = $objA;
$objB->arr = array(new Other_Object());
$objectC->property = $objB
$objectC->other = array(array('k'=>'v'));
如何获得$objectC
中使用的类的列表?
在这种特殊情况下:
array(
'Some_Class',
'Other_Class',
'Another_Class',
'stdClass',
'Another_Object'
)
我需要序列化对象,但反序列化之前,我需要实例所有需要的类。
你会如何自动获得课程?