Exemplo n.º 1
0
 /**
  * This method converts the Info object into an XML_RPC_Value and deletes null fields.
  *
  * @param object &$oInfoObject
  * @return XML_RPC_Value
  */
 function getEntityWithNotNullFields(&$oInfoObject)
 {
     $aInfoData = $oInfoObject->toArray();
     $aReturnData = array();
     foreach ($aInfoData as $fieldName => $fieldValue) {
         if (!is_null($fieldValue)) {
             $aReturnData[$fieldName] = XmlRpcUtils::_setRPCTypeForField($oInfoObject->getFieldType($fieldName), $fieldValue);
         }
     }
     return new XML_RPC_Value($aReturnData, $GLOBALS['XML_RPC_Struct']);
 }