src/Phpforce/SoapClient/Client.php
protected function createSoapVars(array $objects, $type)
    {
        $soapVars = array();

        foreach ($objects as $object) {

            $sObject = $this->createSObject($object, $type);

            $xml = '';
            if (isset($sObject->fieldsToNull)) {
                foreach ($sObject->fieldsToNull as $fieldToNull) {
                    $xml .= '<fieldsToNull>' . $fieldToNull . '</fieldsToNull>';
                }
                $fieldsToNullVar = new \SoapVar(new \SoapVar($xml, XSD_ANYXML), SOAP_ENC_ARRAY);
                $sObject->fieldsToNull = $fieldsToNullVar;
            }

            $soapVar = new \SoapVar($sObject, SOAP_ENC_OBJECT, $type, self::SOAP_NAMESPACE);
            $soapVars[] = $soapVar;
        }

        return $soapVars;
    }
protected function createSoapVars(array $objects, $type)
    {
        $soapVars = array();

        foreach ($objects as $object) {

            $sObject = $this->createSObject($object, $type);

            $xml = '';
            if (isset($sObject->fieldsToNull)) {
                foreach ($sObject->fieldsToNull as $fieldToNull) {
                    $xml .= '<fieldsToNull>' . $fieldToNull . '</fieldsToNull>';
                }
                $fieldsToNullVar = new \SoapVar(new \SoapVar($xml, XSD_ANYXML), SOAP_ENC_ARRAY);
                $sObject->fieldsToNull = $fieldsToNullVar;
            }

            $soapVar = new \SoapVar($sObject, SOAP_ENC_OBJECT, $type, self::SOAP_NAMESPACE);
            $soapVars[] = $soapVar;
        }

        return $soapVars;
    }
protected function createSoapVars ( array $ objects , $ type ) { $ soapVars = array ( ) ; foreach ( $ objects as $ object ) { $ sObject = $ this -> createSObject ( $ object , $ type ) ; $ xml = '' ; if ( isset ( $ sObject -> fieldsToNull ) ) { foreach ( $ sObject -> fieldsToNull as $ fieldToNull ) { $ xml .= '<fieldsToNull>' . $ fieldToNull . '</fieldsToNull>' ; } $ fieldsToNullVar = new \ SoapVar ( new \ SoapVar ( $ xml , XSD_ANYXML ) , SOAP_ENC_ARRAY ) ; $ sObject -> fieldsToNull = $ fieldsToNullVar ; } $ soapVar = new \ SoapVar ( $ sObject , SOAP_ENC_OBJECT , $ type , self :: SOAP_NAMESPACE ) ; $ soapVars [ ] = $ soapVar ; } return $ soapVars ; }
Turn Sobjects into \SoapVars

@param array  $objects Array of objects
@param string $type    Object type

@return \SoapVar[]
Turn Sobjects into \ SoapVars