コード例 #1
0
 /**
  * @covers Acc_Account::set_parameter
  * @todo   Implement testSet_parameter().
  *  @backupGlobals enabled
  */
 public function testSet_parameter()
 {
     $this->object->set_parameter("value", 500);
     $value = $this->object->get_parameter("value");
     $this->assertEquals($value, 500);
 }
コード例 #2
0
$action = 'new';
$val = new IText('p_valu');
$parent = new IText('p_parentu');
$lib = new IText('p_libu');
$lib->css_size = "100%";
$type = new ISelect('p_typeu');
$type->value = Acc_Account::$type;
if ($pcmn_val != "") {
    $action = 'update';
    /*
     * Not empty, show the default value
     */
    $account = new Acc_Account($cn);
    $account->set_parameter('value', $pcmn_val);
    $account->load();
    $val->value = $account->get_parameter('value');
    $parent->value = $account->get_parameter('parent');
    $lib->value = $account->get_parameter('libelle');
    $type->selected = $account->get_parameter('type');
}
require 'template/pcmn_update.php';
$response = ob_get_clean();
$html = escape_xml($response);
if (headers_sent()) {
    echo $response;
    echo $html;
} else {
    header('Content-type: text/xml; charset=UTF-8');
    echo <<<EOF
<?xml version="1.0" encoding="UTF-8"?>
<data>