1, 'auchan' => 2, 'carrefour' => 3, 'match' => 4, 'intermarche' => 5, 'cora' => 6, ]; } /** * Enum labels * * @return array */ protected static function labels(): array { return [ 'leclerc' => 'Leclerc', 'auchan' => 'Auchan', 'carrefour' => 'Carrefour', 'match' => 'Match', 'intermarche' => 'Intermarché', 'cora' => 'Cora', ]; } /** * Enum stickers associés * * @return array */ protected static function stickers(): array { return [ 'leclerc' => \asset('build/assets/images/signs/logo-leclerc.png'), 'auchan' => \asset('build/assets/images/signs/logo-auchan.jpg'), 'carrefour' => \asset('build/assets/images/signs/logo-carrefour.jpg'), 'match' => \asset('build/assets/images/signs/logo-match.png'), 'intermarche' => \asset('build/assets/images/signs/logo-intermarche.png'), 'cora' => \asset('build/assets/images/signs/logo-cora.png'), ]; } /** * @param string $attribute * @return integer|string */ public function __get(string $attribute) { if ($attribute === 'sticker') { return $this->stickers()[$this->getDefinition()] ?? null; } return parent::__get($attribute); } /** * @return array */ public static function getStickers() { return array_values(static::stickers()); } }