search

Home  >  Q&A  >  body text

phpstorm - How does thinkphp use IDE to locate the method location?

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.

给我你的怀抱给我你的怀抱2835 days ago1022

reply all(2)I'll reply

  • 阿神

    阿神2017-05-16 13:11:22

    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();

    reply
    0
  • 黄舟

    黄舟2017-05-16 13:11:22

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

    reply
    0
  • Cancelreply