PHP code example of zorn-v / urfa-client
1. Go to this page and download the library: Download zorn-v/urfa-client library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
zorn-v / urfa-client example snippets
$urfa = new \UrfaClient\UrfaClient();
var_export($urfa->method('rpcf_add_user_new'));
array (
'login' => '',
'password' => '',
'full_name' => '',
'is_juridical' => 0,
'jur_address' => '',
'act_address' => '',
'flat_number' => '',
'entrance' => '',
'floor' => '',
'district' => '',
'building' => '',
'passport' => '',
'house_id' => 0,
'work_tel' => '',
'home_tel' => '',
'mob_tel' => '',
'web_page' => '',
'icq_number' => '',
'tax_number' => '',
'kpp_number' => '',
'email' => '',
'bank_id' => 0,
'bank_account' => '',
'comments' => '',
'personal_manager' => '',
'connect_date' => 0,
'is_send_invoice' => 0,
'advance_payment' => 0,
'switch_id' => 0,
'port_number' => 0,
'binded_currency_id' => 0,
'parameters_count' =>
array (
0 =>
array (
'parameter_id' => 0,
'parameter_value' => '',
),
),
'groups_count' =>
array (
0 =>
array (
'groups' => 0,
),
),
'is_blocked' => 0,
'balance' => 0,
'credit' => 0,
'vat_rate' => 0,
'sale_tax_rate' => 0,
'int_status' => 0,
)
array(
// ...
'parameters_count' => array(
array(
'parameter_id' => 0,
'parameter_value' => 'м',
),
array(
'parameter_id' => 1,
'parameter_value' => '13.06.2014',
),
),
'groups_count' => array(
array(
'groups' => 1000,
),
array(
'groups' => 1001,
),
),
// ...
)
$options = [
'login' => 'init',
'password' => 'init',
'host' => 'localhost',
];
$urfa = new \UrfaClient\UrfaClient($options);
$result = $urfa->rpcf_add_user_new(array(
'login'=>'test',
'password'=>'test',
));
ons = [
'host' => 'localhost',
'login' => 'init',
'password' => 'init',
'debug' => true,
];
class Logger extends \Psr\Log\AbstractLogger
{
public function log($level, $message, array $context = array())
{
echo $level.' '.$message."\n";
}
}
$urfa = new \UrfaClient\UrfaClient($options, new Logger());
print_r($urfa->rpcf_whoami());