This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.
There is no license information available for the latest version (v0.3.17) of this package.



v0.3.17 2018-01-18 22:00 UTC


It is bundle of useful eRepublik's utilities. ###Erpk\Common\DateTime That class extends original PHP DateTime. Examples: ####Create DateTime from eRepublik day

use Erpk\Common\DateTime;
$dateTime = DateTime::createFromDay(1849);
echo 'Day 1849 is '.$dateTime->format('Y-m-d');


Day 1849 is 2012-12-12

####Show current eRepublik day

use Erpk\Common\DateTime;
$dateTime = new DateTime;
echo 'Today is '.$dateTime->getDay().' eRepublik\'s day';

Output (may differ)

Today is 1849 eRepublik's day


use Erpk\Common\EntityManager;
$em = new EntityManager;

// Search for country
$countries = $em->getRepository('Erpk\Common\Entity\Country');

$country = $countries->findOneByCode('AU');
echo $country->getId(); // returns "50"
echo $country->getName(); // returns "Australia"
echo $country->getCode(); // returns "AU"

// You can also search by ID or name
$country = $countries->findOneById(50);
$country = $countries->findOneByName('Australia');