Exemple #1
0
 protected static function accessValue(HermitParam $target, $name)
 {
     $target->checkAccessKey();
     if (isset($target->__accessKeys__[$name])) {
         $keyName = $target->__accessKeys__[$name];
         // -7 == -1 * strlen('_COLUMN');
         $key = substr($keyName, -7);
         if (self::COLUMN_SUFFIX === $key) {
             $name = substr($keyName, 0, -7);
         }
     }
     return $name;
 }
$param->set('param', 7900);
$result = $hermit->callINOUT_MULTI($param);
$test->is($param->get('param'), 'hello world');
$test->is(count($result), 1);
$test->is(count($result[0]), 1);
$rs = $result[0][0];
$test->is($rs->ENAME, 'JAMES');
$test->is($rs->EMPNO, 7900);
$param = new HermitParam();
$result = $hermit->callOUT_MULTI($param);
$test->is($param->get('param'), 'hello world');
$test->is(count($result), 1);
$test->is(count($result[0]), 14);
$test->is($result[0][0]->MGR, 7902);
$test->is($result[0][1]->MGR, 7698);
$test->is($result[0][13]->MGR, 7782);
$param = new HermitParam();
$param->set('param_1', 7499);
$param->set('param_2', 7521);
$param->set('param_3', 7654);
$result = $hermit->callNOSPEC_PARAM($param);
$test->is(count($result), 3);
$rs = $result[0];
$test->is($rs[0]->EMPNO, 7499);
$test->is($rs[0]->ENAME, 'ALLEN');
$rs = $result[1];
$test->is($rs[0]->EMPNO, 7521);
$test->is($rs[0]->ENAME, 'WARD');
$rs = $result[2];
$test->is($rs[0]->EMPNO, 7654);
$test->is($rs[0]->ENAME, 'MARTIN');