Programmation orientée objet / POO / OOP
//Create a new instance of Recipe called $sugarCookie $sugarCookie = new Recipe(); $sugarCookie->addIngredient("sugar"); $sugarCookie->addIngredient("flour"); $sugarCookie->addIngredient("butter"); $sugarCookie->addStep("Mix together"); $sugarCookie->addStep("Cut out shapes"); $sugarCookie->addStep("Put in oven"); $sugarCookie->printOutput();
Object-oriented programming (OOP) is a programming paradigm based on the concept of “objects”, which can contain data, in the form of fields (often known as attributes), and code, in the form of procedures (often known as methods).
source: https://en.wikipedia.org/wiki/Object-oriented_programming (vf)
Doc & Tutos
- What's an object? A beginner's guide to Object Oriented Programming avec comme exemple des recettes de cuisine
- La POO en PHP un tuto vidéo très complet avec des dizaines de leçons et exercices sur l'excellent site grafikart
- Programmation Orientée Objet (POO) petit tuto avec des exemples du monde animal
- Synthèse de la Programmation orientée objet en PHP cheatsheet sur la POO
D'excellent tutos + vidéos: