本文整理匯總了PHP中SimpleORMap::toArray方法的典型用法代碼示例。如果您正苦於以下問題:PHP SimpleORMap::toArray方法的具體用法?PHP SimpleORMap::toArray怎麽用?PHP SimpleORMap::toArray使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類SimpleORMap
的用法示例。
在下文中一共展示了SimpleORMap::toArray方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: toArray
public function toArray()
{
$ret = parent::toArray();
$ret['properties'] = $this->getProperties();
return $ret;
}
示例2: toArray
/**
* Returns an array representation of this semester.
*
* @param mixed $only_these_fields List of fields to extract
* @return array represenation
*/
public function toArray($only_these_fields = null)
{
if (!isset($only_these_fields)) {
$fields = array_flip(array_diff($this->known_slots, array_keys($this->relations)));
unset($fields['absolute_seminars_count']);
unset($fields['duration_seminars_count']);
unset($fields['continuous_seminars_count']);
$only_these_fields = array_flip($fields);
}
return parent::toArray($only_these_fields);
}