Beginner, encounter this, can not realize the beauty of the, record;
The broad logic is as follows
abstractclassA{privatestatic$c; finalfunctiontodo() {//do something } publicfunctioninit() {$cnew B; } publicfunctionget() {$c->todo(); }}classBextendsA{}....A::get();
Here are some questions that arise:
1. Can a subclass be new in the parent class?
2. What are the considerations for doing so? Or does this design pattern prevent problems from appearing?
'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
'). Text (i)); }; $numbering. FadeIn (1700); }); });
The above introduces the abstract class in PHP in its methods to instantiate its subclasses to complete the invocation of their own methods, including aspects of the content, I hope that the PHP tutorial interested in a friend helpful.