Using Abstract Classes to Define Rules

Tutorials Shared by the Internet Community

Advertisements


Synopsis

The way i visualize this is to think that i am entering into an agreement between me and PHP.

Statistics

  • Total Hits - 26843

  • Total Votes - 98 votes

  • Vote Up - 42 votes

  • Vote Down - 56 votes

  • Domain - www.talkphp.com

  • Category - PHP/Object Oriented

  • Submitted By - Devesh Khanna

  • Submitted on - 2008-03-16 07:45:00

Description

The way i visualize this is to think that i am entering into an 'agreement' between me and PHP. In other words, I have defined a list of methods (rules) in the interface that I (or any other developer) must implement in any implemented class, so in any implemented classes i am agreeing to conform with the interface's rules. ...


Site  |   Broken  |   Tweet  |   Facebook  |     |   Save  |   Liked  |   Down

Advertisements