public function templateMethod() { // 模板方法 调用基本方法组装顶层逻辑 $this->primitiveOperation1(); $this->primitiveOperation2(); }