protected static function convert_object_to_array($object) {
	if (is_object($object) == false) {
		throw new \Exception('can only convert objects');
	}
	
	if ($object instanceof \alsvanzelf\jsonapi\resource) {
		return $object->get_array();
	}
	
	return get_object_vars($object);
}
protected static function convert_object_to_array($object) {
	if (is_object($object) == false) {
		throw new \Exception('can only convert objects');
	}
	
	if ($object instanceof \alsvanzelf\jsonapi\resource) {
		return $object->get_array();
	}
	
	return get_object_vars($object);
}
protected static function convert_object_to_array ( $ object ) { if ( is_object ( $ object ) == false ) { throw new \ Exception ( 'can only convert objects' ) ; } if ( $ object instanceof \ alsvanzelf \ jsonapi \ resource ) { return $ object -> get_array ( ) ; } return get_object_vars ( $ object ) ; }
converting an object to an array

@param  object $object by default, its public properties are used
if it is a \alsvanzelf\jsonapi\resource, its ->get_array() is used
@return array
converting an object to an array