Posts

Showing posts with the label call

Call superclass method in object oriented PHP application

You can call parent methods using :: operator, as in example below: parent::init( 'aaa' ); This situation works also, when dealing with static methods.

How to call parent constructor ?

If you write your own constructor, you propably will want to call a parent construtor first to set up a class. You can do it in that way: parent::__construct(); This can be used also to call parent methods.