- open the /index.php file for editing
- replace $application->Run(); line with below code:
/** @var UsersItem $user */ $user = $application->recallObject('u.test', null, array('skip_autoload' => true)); $user->SetFieldOption('EmailVerified', 'formatter', 'kFormatter'); $user->SetFieldOption('EmailVerified', 'format', '%01.6f'); $user->SetFieldOption('EmailVerified', 'keep_cents', 2); $user->SetDBField('EmailVerified', '12.345000'); echo $user->GetField('EmailVerified') . '<br/>' . PHP_EOL; // '12.345' $user->SetDBField('EmailVerified', '12.300000'); echo $user->GetField('EmailVerified') . '<br/>' . PHP_EOL; // '12.30' $user->SetDBField('EmailVerified', '12.030000'); echo $user->GetField('EmailVerified') . '<br/>' . PHP_EOL; // '12.03' $user->SetDBField('EmailVerified', '12.030050'); echo $user->GetField('EmailVerified') . '<br/>' . PHP_EOL; // '12.03005' $user->SetDBField('EmailVerified', '12.000000'); echo $user->GetField('EmailVerified') . '<br/>' . PHP_EOL; // '12.00'
- save changes
- open the /index.php file from the Web Browser
- confirm, that the output contains:
12.345 12.30 12.03 12.03005 12.00