phpstorm - How does thinkphp use IDE to locate the method location?
给我你的怀抱
给我你的怀抱 2017-05-16 13:09:22
0
2
1004

I don’t know what the consequences of writing the following will be, which is why I raised this question.
Software and versions related to the problem
thinkphp3.2.3
phpstorm 2017.1 (this is what the IDE refers to below)

Question:

Will this way of writing bring any inconvenience to later maintenance?

Is there a big performance difference between the method written in this way and the D method?

What other locations are there for quick positioning methods?


I write it this way mainly so that the IDE can locate the method location. Due to the D and M methods, the method location cannot be located.

<?php
namespace Home\Logic;
use Home\Model\OrderBulktradeModel;
use Home\Model\OrderBulktradeGoodsModel;
use Home\Model\BulkGoodsModel;
use Home\Model\BusinessUserModel;
use Home\Model\MemberModel;
use Home\Model\MemberBusinessModel;
use Home\Logic\RegionLogic;
use Home\Logic\UserLogic;
class OrderLogic extends HomeLogic
{
    public function test()
    {
        $userObj = new UserLogic();
    }
    //Omit 10,000 lines of code here
    
}

Relevant information consulted
ThinkStorm Portal
After my current IDE is installed, it cannot be located.

给我你的怀抱
给我你的怀抱

reply all(2)
阿神

No problem, this is how I wrote it when I was developing ThinkPHP.

  1. The system comes with model

$m = new Model('User');
  1. Model written by myself

$m = new UserModel();
黄舟

Hold down ctrl + left-click the function you want to trace. . .

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template