i5_userspace_get

 

Retrieve user space data.

 

bool i5_userspace_get (

resource user_space,
array
params
[, int Offset])

 

Parameters

 

 

User_space

User Space resource returned by i5_userspace_prepare

params

Parameters according to description.
If params is an associative array, it associates the name of virtual fields to get, with the PHP variable to fill up with the value.

If given as flat array, then parameters are assigned in order

 

Offset

Offset from the beginning of the user space, of the data to get.

 

 

Returns:

True if OK, false if failed.

 

I5_ERR_PARSEXML

42

Internal error; please contact Aura Equipement; error number 42

I5_ERR_PHP_OPTIONSTYPE

259

The type of " I5_OPTIONS_ALIAS" option must be x and not x

I5_ERR_PHP_OPTIONSNUMBER

260

Option number -1 is unknown.

I5_ERR_PHP_TYPEPARAM

262

Type of element x in parameter -1 must be y. Type z was provided.

I5_ERR_PHP_VARIABLE

281

You can't use the I5_bind_param function and specify parameters

 

 

Example

 

 

$parameter = Array(

  "filler0"=>"AAAA",

  "generic"=>10,

  "filler"=>"BBB",

  "outputsize"=>100,

  "offsetInput"=> 0

 );

 $parmOut = array("filler0"=>"filler0", "filler"=>"filler", "generic"=>"generic", "outputsize"=>"outputsize", "offsetInput"=>"offsetInput");

 $UspcHdl = i5_userspace_prepare("qtemp/USERSPACE", $description);

 if (is_bool($UspcHdl)) trigger_error("i5_userspace_prepare error : ".i5_errormsg(), E_USER_ERROR);

 

 $ret = i5_userspace_put($UspcHdl, $parameter);

 if (!$ret) trigger_error("i5_userspace_put error : ".i5_errormsg(), E_USER_ERROR);

 

 $ret = i5_userspace_get($UspcHdl, $parmOut);

 if (!$ret){

  trigger_error("i5_userspace_get error : ".i5_errormsg(), E_USER_ERROR);

 } else {

  echo "Filler0 : ".$filler0."<BR>";

  echo "generic : ".$generic."<BR>";

  echo "filler : ".$filler."<BR>";

  echo "outputsize : ".$outputsize."<BR>";

  echo "offsetInput : ".$offsetInput."<BR>";  

 }
$ret = i5_userspace_close($UspcHdl);
if (!$ret) trigger_error("i5_userspace_close error : ".i5_errormsg(), E_USER_ERROR);