我在交响乐中有对象echo var_dump($tt);
给了我:
object(PropelObjectCollection)#635 (4) {
["model":protected]=>
string(32) "Style\ModelBundle\Model\Company"
["iterator":protected]=>
NULL
["formatter":protected]=>
object(PropelObjectFormatter)#634 (9) {
["collectionName":protected]=>
string(22) "PropelObjectCollection"
}
["storage":"ArrayObject":private]=>
array(1) {
[0]=>
object(Style\ModelBundle\Model\Company)#636 (69) {
["startCopy":protected]=>
bool(false)
["id":protected]=>
int(2278701)
["name":protected]=>
string(26) "xxx"
["modifiedColumns":protected]=>
array(0) {
}
["virtualColumns":protected]=>
array(0) {
}
}
}
}
如何从'name'变量中获取?
我在尝试"$tt->storage->{'name'}"
但它没有用,所以有人会给我一个线索吗?