title; } public function array(): array { $rows = [ ['RATE TABLE — ' . strtoupper($this->title)], ['IFNEX Logistics'], ['Weight (kg)', 'Zone 1', 'Zone 2', 'Zone 3', 'Zone 4', 'Zone 5', 'Zone 6', 'Zone 7', 'Zone 8', 'Zone 9', 'Zone 10'], [''], ]; $weights = [0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.5, 13, 13.5, 14, 14.5, 15, 15.5, 16, 16.5, 17, 17.5, 18, 18.5, 19, 19.5, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100]; foreach ($weights as $w) { $rows[] = array_merge([$w], array_fill(0, 10, '')); } return $rows; } } class DocEcoSheet implements FromArray, WithTitle { public function title(): string { return 'DocEco'; } public function array(): array { $rows = [ ['Weight (kg)', 'Zone', 'Rate (AED)'], ]; $weights = [0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 50]; foreach ($weights as $w) { $rows[] = [$w, 1, '']; $rows[] = [$w, 2, '']; $rows[] = [$w, 3, '']; } return $rows; } }