【发布时间】:2013-09-08 18:46:03
【问题描述】:
我有一个 Volume 类的对象数组。我正在寻找在给定 _id 值的情况下返回 _description 属性的最佳方式(访问器方法是 get_description)。
在下面的示例中,我将提供“vol-e123456a3”,它会返回“server E: volume”。
[0] => Volume Object
(
[_snapshot_count:protected] => 16
[_id:protected] => vol-e123456a3
[_description:protected] => server E: volume
[_region:protected] => us-east-1
[_date_created:protected] => DateTime Object
(
[date] => 2013-04-06 10:29:41
[timezone_type] => 2
[timezone] => Z
)
[_size:protected] => 100
[_state:protected] => in-use
)
【问题讨论】:
-
the best way是什么意思,你在尝试什么吗?