Methods v13

Methods are SPL procedures or functions defined within an object type. Methods can be categorized into three general types:

  • Member Methods – procedures or functions that operate within the context of an object instance. Member methods have access to, and can change the attributes of the object instance on which they are operating.
  • Static Methods – procedures or functions that operate independently of any particular object instance. Static methods do not have access to, and cannot change the attributes of an object instance.
  • Constructor Methods – functions used to create an instance of an object type. A default constructor method is always provided when an object type is defined.