Skip to content

Basic (v2.x)

Jan Galek edited this page Jul 30, 2018 · 2 revisions

Basic

Configuration

$shippers = [
	'Geis' => [
		'endHour' => 13,
		'endMinute' => 0,
		'weekend' => false,
		'deliveryTime' => 1,
	],
	'PPL' => [
		'endHour' => 14,
		'endMinute' => 0,
		'weekend' => false,
		'deliveryTime' => 1,
	],
	'DPD' => [
		'endHour' => 14,
		'endMinute' => 0,
		'weekend' => false,
		'deliveryTime' => 1,
	],
];

$workTime = [
	'start' => [
		'hour' => 8,
		'minute' => 0
	],
	'end' => [
		'hour' => 16,
		'minute' => 30
	],
	'weekend' => false
];

$config = [
	'cz' => [
		'country' => 'CzechRepublic',
		'work' => $workTime,
		'shippers' => $shippers,
	],
	'sk' => [
		'country' => 'Slovakia',
		'work' => $workTime,
		'shippers' => $shippers,
	],
];


$configuration = new \Galek\Utils\Calendar\Configuration\CalendarManager($config);

Usages

$geis = $configuration->getShipper('cz', 'Geis');
Clone this wiki locally