Should I use Instance Method or Static Method?

Instance methods are called using the following syntax:
CALL METHOD instance_name->instance_method_name

A static method which is also called as class method can be called using the class and does not require an Instance. Static methods are called using the following syntax:
CALL METHOD class_name=>instance_method_name

Class Methods are similar to instance methods but can only use static components.

No comments:

Post a Comment