Answer the question
In order to leave comments, you need to log in
How to auto-inherit Yii classes in PhpStorm?
Can you please tell me how to make automatic inheritance of Yii classes in PhpStorm?
For example, there is a project based on the Yii framework. I am creating a controller TestController.php
PhpStorm automatically inserts code like this
<?php
namespace app\controllers;
class TestController
{
}
<?php
namespace app\controllers;
use yii\web\Controller;
class TestController extends Controller
{
}
Answer the question
In order to leave comments, you need to log in
And how does the storm know what class you want to inherit? maybe you have your own base class that you have already inherited from the framework?
I think such a feature will be delivered with a cognitive interface, except perhaps
This is only possible with a set of artificial intelligence, and even with the prediction function. How can anyone know from which class you plan to inherit your class?
But PS has templates where you can customize your own, which will create a file with any content.
There is also a gii that generates the correct controller, which can also be customized to your liking.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question