public static function getSObjectFields(SObject $sob) {
			if (!isset($sob->fields))
				return null;

			$fields = $sob->fields;

			if (is_object($fields))
				$fields = get_object_vars($fields);

			return $fields;
		}
public static function getSObjectFields(SObject $sob) {
			if (!isset($sob->fields))
				return null;

			$fields = $sob->fields;

			if (is_object($fields))
				$fields = get_object_vars($fields);

			return $fields;
		}
public static function getSObjectFields ( SObject $ sob ) { if ( ! isset ( $ sob -> fields ) ) return null ; $ fields = $ sob -> fields ; if ( is_object ( $ fields ) ) $ fields = get_object_vars ( $ fields ) ; return $ fields ; }
Gets the Salesforce fields member out of an SObject, and guarentees conversion to an associative array.

@param  SObject $sob the SObject to retrieve the fields member from
@return array|null      the fields member as an associative array, or null if fields is not defined
Gets the Salesforce fields member out of an SObject and guarentees conversion to an associative array .