src/icepay_api_webservice.php
public function parseForChecksum($mainObject, $subObject, $arrange = false, $order = array())
    {

        if (!is_object($mainObject))
            throw new Exception("Please provide a valid Object");

        $mainObject = $mainObject;

        $i = 1;

        $subObject = $this->forceArray($subObject);

        foreach ($subObject as $sub) {
            // $sub is always an object, just a double-check
            if (is_object($sub)) {
                if ($arrange) {
                    // Arrange object in right order
                    $sub = $this->arrangeObject($sub, $order);
                }

                // Inject each value of subObject into $obj as property for checksum
                foreach ($sub as $value) {
                    $mainObject->$i = $value;
                    $i++;
                }
            }
        }

        return $mainObject;
    }
public function parseForChecksum($mainObject, $subObject, $arrange = false, $order = array())
    {

        if (!is_object($mainObject))
            throw new Exception("Please provide a valid Object");

        $mainObject = $mainObject;

        $i = 1;

        $subObject = $this->forceArray($subObject);

        foreach ($subObject as $sub) {
            // $sub is always an object, just a double-check
            if (is_object($sub)) {
                if ($arrange) {
                    // Arrange object in right order
                    $sub = $this->arrangeObject($sub, $order);
                }

                // Inject each value of subObject into $obj as property for checksum
                foreach ($sub as $value) {
                    $mainObject->$i = $value;
                    $i++;
                }
            }
        }

        return $mainObject;
    }
public function parseForChecksum ( $ mainObject , $ subObject , $ arrange = false , $ order = array ( ) ) { if ( ! is_object ( $ mainObject ) ) throw new Exception ( "Please provide a valid Object" ) ; $ mainObject = $ mainObject ; $ i = 1 ; $ subObject = $ this -> forceArray ( $ subObject ) ; foreach ( $ subObject as $ sub ) { // $sub is always an object, just a double-check if ( is_object ( $ sub ) ) { if ( $ arrange ) { // Arrange object in right order $ sub = $ this -> arrangeObject ( $ sub , $ order ) ; } // Inject each value of subObject into $obj as property for checksum foreach ( $ sub as $ value ) { $ mainObject -> $ i = $ value ; $ i ++ ; } } } return $ mainObject ; }
Inserts properties of sub object into mainobject as property

@since version 1.0.2
@access public
@param object $mainObject !required
@param object $subObject !required
@param bool $arrange
@param array $order !required if $arrange == true
@return object $obj
Inserts properties of sub object into mainobject as property