mirror of
https://github.com/getnamingo/registry.git
synced 2025-05-17 10:06:59 +02:00
Application create is possible via EPP too
This commit is contained in:
parent
f2326a92e0
commit
c5b2783fbf
3 changed files with 629 additions and 343 deletions
|
@ -9,6 +9,7 @@
|
||||||
"namingo/rately": "^0.1.0",
|
"namingo/rately": "^0.1.0",
|
||||||
"moneyphp/money": "^4.6",
|
"moneyphp/money": "^4.6",
|
||||||
"phpmailer/phpmailer": "^6.9",
|
"phpmailer/phpmailer": "^6.9",
|
||||||
"filips123/monolog-phpmailer": "^2.0"
|
"filips123/monolog-phpmailer": "^2.0",
|
||||||
|
"ramsey/uuid": "^4.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -23,6 +23,9 @@ use Money\Currency;
|
||||||
use Money\Converter;
|
use Money\Converter;
|
||||||
use Money\Currencies\ISOCurrencies;
|
use Money\Currencies\ISOCurrencies;
|
||||||
use Money\Exchange\FixedExchange;
|
use Money\Exchange\FixedExchange;
|
||||||
|
use Ramsey\Uuid\Uuid;
|
||||||
|
use Ramsey\Uuid\Guid\Guid;
|
||||||
|
use Ramsey\Uuid\Exception\UnsatisfiedDependencyException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets up and returns a Logger instance.
|
* Sets up and returns a Logger instance.
|
||||||
|
@ -859,6 +862,20 @@ function formatMoney(Money $money) {
|
||||||
return number_format($money->getAmount() / 100, 2, '.', '');
|
return number_format($money->getAmount() / 100, 2, '.', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function createUuidFromId($id) {
|
||||||
|
// Define a namespace UUID; this should be a UUID that is unique to your application
|
||||||
|
$namespace = '123e4567-e89b-12d3-a456-426614174000';
|
||||||
|
|
||||||
|
// Generate a UUIDv5 based on the namespace and a name (in this case, the $id)
|
||||||
|
try {
|
||||||
|
$uuid5 = Uuid::uuid5($namespace, (string)$id);
|
||||||
|
return $uuid5->toString();
|
||||||
|
} catch (UnsatisfiedDependencyException $e) {
|
||||||
|
// Handle exception
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch a single value from the database using PDO.
|
* Fetch a single value from the database using PDO.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue