It is possible to restrict what calls a method by setting the method's access. By default all methods are public methods. The available settings for method access are:
public This access state is the default. A public method can be called by any object. protected Protected methods can only be called by the defining object, or descendants of the defining object (sender() must be this()). private Private methods can only be called by the object they were defined on (caller() must be this()). root Root methods can only be called by the $root object (caller() must be $root). driver Driver methods can only be called by the driver. frob This access state only allows Frobbed Method Calls.
Method access can be manipulated using the functions method_access() and set_method_access().
Code | Flags | Access