我有一个依赖于其他对象的对象实例,例如
$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'
)
我需要序列化对象,但在反序列化之前我需要实例化所有需要的类。
您将如何自动获取课程?