1. Go to this page and download the library: Download byrokrat/banking 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/ */
byrokrat / banking example snippets
$accountFactory = new \byrokrat\banking\AccountFactory;
$account = $accountFactory->createAccount('50001111116');
// Prints a formatted version of the validated number (5000,111111-6)
echo $account->getNumber();
$accountFactory = new \byrokrat\banking\AccountFactory(new \byrokrat\banking\StrictFactory);
// Will throw an exception as '-' is not a valid character in strict mode
$accountFactory->createAccount('5000-1111116');
$accountFactory = new \byrokrat\banking\AccountFactory(
new \byrokrat\banking\StrictFactory,
new \byrokrat\banking\Rewriter\RewriterContainer
);
// Will throw an exception as the serial number is too long and can not be trimmed.
$accountFactory->createAccount('5000,01111116');