The self keyword points to the containing class and is unaware of subclasses.
self关键字指向的是包含类,且不会意识到子类。
As with properties, any attempt to call a private method from outside the containing class causes a fatal error.
与属性一样,尝试从包含类外部调用私有方法将导致致命错误。
This is an implementation detail, and you can simply refer to variables in the containing class as though they were values in the current class.
这里所说的是实现细节了,我们可以直接访问外部类中的变量,就好像这些变量定义在内部类中一样。
应用推荐