PHP Classes

File: README.md

Recommend this page to a friend!
  Classes of Manolo Salsas   PHP Polymorphism Example   README.md   Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: PHP Polymorphism Example
Show several ways of implementing of polymorphism
Author: By
Last change:
Date: 3 years ago
Size: 1,500 bytes
 

Contents

Class file image Download

Polymorphism

This is a project to explain the polymorphism concept diving into:

  • No inheritance
  • Inheritance
  • Abstraction and inheritance
  • Interface implementation

You can find examples guiding you through all of the steps bellow

  • [Service\Basic][1] uses models from [Model\Basic][2]
  • [Service\Inheritance][3] uses models from [Model\Inheritance][4]
  • [Service\AbstractInheritance][5] uses models from [Model\AbstractInheritance][6]
  • [Service\InterfaceImplementation][7] uses models from [Model\InterfaceImplementation][8]

Extended explanation in spanish can be found [here][9]

[1]: https://github.com/motorflash/polymorphism/tree/master/src/AppBundle/Service/Basic [2]: https://github.com/motorflash/polymorphism/tree/master/src/AppBundle/Model/Basic [3]: https://github.com/motorflash/polymorphism/tree/master/src/AppBundle/Service/Inheritance [4]: https://github.com/motorflash/polymorphism/tree/master/src/AppBundle/Model/Inheritance [5]: https://github.com/motorflash/polymorphism/tree/master/src/AppBundle/Service/AbstractInheritance [6]: https://github.com/motorflash/polymorphism/tree/master/src/AppBundle/Model/AbstractInheritance [7]: https://github.com/motorflash/polymorphism/tree/master/src/AppBundle/Service/InterfaceImplementation [8]: https://github.com/motorflash/polymorphism/tree/master/src/AppBundle/Model/InterfaceImplementation [9]: https://github.com/motorflash/polymorphism/tree/master/docs/polimorfismo.md

Testing

./vendor/bin/phpunit