src/icepay_api_webservice.php
public function arrangeObject($object, $order = array())
    {

        if (!is_object($object))
            throw new Exception("Please provide a valid Object for the arrangeObject method");
        if (!is_array($order) || empty($order))
            throw new Exception("Please provide a valid orderArray for the arrangeObject method");

        $obj = new stdClass();

        foreach ($order as $key) {
            $obj->$key = $object->$key;
        }
        return $obj;
    }
public function arrangeObject($object, $order = array())
    {

        if (!is_object($object))
            throw new Exception("Please provide a valid Object for the arrangeObject method");
        if (!is_array($order) || empty($order))
            throw new Exception("Please provide a valid orderArray for the arrangeObject method");

        $obj = new stdClass();

        foreach ($order as $key) {
            $obj->$key = $object->$key;
        }
        return $obj;
    }
public function arrangeObject ( $ object , $ order = array ( ) ) { if ( ! is_object ( $ object ) ) throw new Exception ( "Please provide a valid Object for the arrangeObject method" ) ; if ( ! is_array ( $ order ) || empty ( $ order ) ) throw new Exception ( "Please provide a valid orderArray for the arrangeObject method" ) ; $ obj = new stdClass ( ) ; foreach ( $ order as $ key ) { $ obj -> $ key = $ object -> $ key ; } return $ obj ; }
Arrange the object in given order

@since 1.0.2
@access public
@param object $object !required
@param array $order !required
@return object $obj
Arrange the object in given order