Add IDE autocomplete hints (#253)
This commit is contained in:
parent
fb5da1b4d0
commit
0326819637
33
config/__autocomplete.php
Normal file
33
config/__autocomplete.php
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class only exists here for IDE (PHPStorm/Netbeans/...) autocompletion.
|
||||||
|
* This file is never included anywhere.
|
||||||
|
* Adjust this file to match classes configured in your application config, to enable IDE autocompletion for custom components.
|
||||||
|
* Example: A property phpdoc can be added in `__Application` class as `@property \vendor\package\Rollbar|__Rollbar $rollbar` and adding a class in this file
|
||||||
|
* ```php
|
||||||
|
* // @property of \vendor\package\Rollbar goes here
|
||||||
|
* class __Rollbar {
|
||||||
|
* }
|
||||||
|
* ```
|
||||||
|
*/
|
||||||
|
class Yii {
|
||||||
|
/**
|
||||||
|
* @var \yii\web\Application|\yii\console\Application|__Application
|
||||||
|
*/
|
||||||
|
public static $app;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @property yii\rbac\DbManager $authManager
|
||||||
|
* @property \yii\web\User|__WebUser $user
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class __Application {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @property app\models\User $identity
|
||||||
|
*/
|
||||||
|
class __WebUser {
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user