Search code examples
cakephp-2.3system-requirements

Cakephp object oriented or structured approach?


I am writing SRS document and I am confused whether cakephp is object oriented or structured approach? I know this is very lame questions but still need a confirmation. Thank you


Solution

  • It is Object Oriented - as is 99% of code nowadays.

    If you take a look at the source code of CakePHP 2.x you will see examples such as:

    class Controller extends Object implements CakeEventListener {
    

    Meaning the Controller class extends the Object class and implements the CakeEventListener interface.

    It would probably be useful to read through http://php.net/manual/en/language.oop5.php so you can get an understanding of what Object Oriented coding in PHP looks like