- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
public static function ObjectToArray($obj, $filter_fields = true)
{
$a = array();
$cv = array();
if($filter_fields)
{
$cv = get_class_vars(get_class($obj));
}
else
{
$cv = get_object_vars($obj);
}
foreach($cv as $k => $v)
{
$a[$k] = $obj->$k;
}
return $a;
}
guest8 09.04.2019 12:41 # −999