Skip to content

Commit 65d25f4

Browse files
committed
Add __autocomplete.php
1 parent 34aeec6 commit 65d25f4

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

‎config/__autocomplete.php

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
3+
/**
4+
* This class only exists here for IDE (PHPStorm/Netbeans/...) autocompletion.
5+
* This file is never included anywhere.
6+
* Adjust this file to match classes configured in your application config, to enable IDE autocompletion for custom components.
7+
* Example: A property phpdoc can be added in `__Application` class as `@property \vendor\package\Rollbar|__Rollbar $rollbar` and adding a class in this file
8+
* ```php
9+
* // @property of \vendor\package\Rollbar goes here
10+
* class __Rollbar {
11+
* }
12+
* ```
13+
*/
14+
class Yii {
15+
/**
16+
* @var \yii\web\Application|\yii\console\Application|__Application
17+
*/
18+
public static $app;
19+
}
20+
21+
/**
22+
* @property yii\rbac\DbManager $authManager
23+
* @property \yii\web\User|__WebUser $user
24+
*
25+
*/
26+
class __Application {
27+
}
28+
29+
/**
30+
* @property app\models\User $identity
31+
*/
32+
class __WebUser {
33+
}

0 commit comments

Comments
 (0)