1. Go to this page and download the library: Download jeidison/paxb 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/ */
jeidison / paxb example snippets
...
class DateBrAdapter implements XmlAdapter
{
public function marshal(mixed $object): mixed
{
return $object->format('d/m/Y');
}
public function unmarshal(mixed $object): mixed
{
return DateTime::createFromFormat('d/m/Y', $object)
->setTime(null, null, null);
}
}