You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 satır
1.3KB

  1. <?php
  2. function version(string $date, array $featuresArray, array $maintenanceArray) {
  3. release_date($date);
  4. features($featuresArray);
  5. maintenance($maintenanceArray);
  6. }
  7. function release_date(string $date) {
  8. $html = '<div class="block">';
  9. $html .= '<h4><span class="glyphicon glyphicon-calendar"></span> Date de sortie</h4>';
  10. $html .= '<ul><li>'.$date.'</li></ul>';
  11. $html .= '</div>';
  12. echo $html;
  13. }
  14. function features(array $featuresArray) {
  15. if(count($featuresArray) > 0) {
  16. $html = '<div class="block">';
  17. $html .= '<h4><span class="glyphicon glyphicon-flash"></span> Évolutions</h4>';
  18. $html .= '<ul>';
  19. foreach($featuresArray as $feature) {
  20. $html .= '<li>'.$feature.'</li>';
  21. }
  22. $html .= '</ul>';
  23. $html .= '</div>';
  24. echo $html;
  25. }
  26. }
  27. function maintenance(array $maintenanceArray) {
  28. if(count($maintenanceArray) > 0) {
  29. $html = '<div class="block">';
  30. $html .= '<h4><span class="glyphicon glyphicon-wrench"></span> Maintenance</h4>';
  31. $html .= '<ul>';
  32. foreach($maintenanceArray as $maintenance) {
  33. $html .= '<li>'.$maintenance.'</li>';
  34. }
  35. $html .= '</ul>';
  36. $html .= '</div>';
  37. echo $html;
  38. }
  39. }