function add_param($argument, $type = 'string') {

        $allowed_types = array('none',
                               'empty',
                               'base64',
                               'boolean',
                               'datetime',
                               'double',
                               'int',
                               'i4',
                               'string',
                               'array',
                               'struct');
        if (!in_array($type, $allowed_types)) {
            return false;
        }

        if ($type != 'datetime' && $type != 'base64') {
            $this->params[] = $argument;
            return true;
        }

        // Note weirdness - The type of $argument gets changed to an object with
        // value and type properties.
        // bool xmlrpc_set_type ( string &value, string type )
        xmlrpc_set_type($argument, $type);
        $this->params[] = $argument;
        return true;
    }
function add_param($argument, $type = 'string') {

        $allowed_types = array('none',
                               'empty',
                               'base64',
                               'boolean',
                               'datetime',
                               'double',
                               'int',
                               'i4',
                               'string',
                               'array',
                               'struct');
        if (!in_array($type, $allowed_types)) {
            return false;
        }

        if ($type != 'datetime' && $type != 'base64') {
            $this->params[] = $argument;
            return true;
        }

        // Note weirdness - The type of $argument gets changed to an object with
        // value and type properties.
        // bool xmlrpc_set_type ( string &value, string type )
        xmlrpc_set_type($argument, $type);
        $this->params[] = $argument;
        return true;
    }
function add_param ( $ argument , $ type = 'string' ) { $ allowed_types = array ( 'none' , 'empty' , 'base64' , 'boolean' , 'datetime' , 'double' , 'int' , 'i4' , 'string' , 'array' , 'struct' ) ; if ( ! in_array ( $ type , $ allowed_types ) ) { return false ; } if ( $ type != 'datetime' && $ type != 'base64' ) { $ this -> params [ ] = $ argument ; return true ; } // Note weirdness - The type of $argument gets changed to an object with // value and type properties. // bool xmlrpc_set_type ( string &value, string type ) xmlrpc_set_type ( $ argument , $ type ) ; $ this -> params [ ] = $ argument ; return true ; }
Add a parameter to the array of parameters.

@param  string  $argument    A transport ID, as defined in lib.php
@param  string  $type        The argument type, can be one of:
none
empty
base64
boolean
datetime
double
int
string
array
struct
In its weakly-typed wisdom, PHP will (currently)
ignore everything except datetime and base64
@return bool                 True on success
Add a parameter to the array of parameters .