phpstorm yii2 framework redis and mongodb tips

Yii_helper.php easily find a directory to create a file, reads as follows:

/**
 * Class Yii
 */
class Yii
{
    /**
     * @var MyApplication
     */
    public static $app;

}

/**
 * Class myApp
 * @property \yii\redis\Connection $redis
 * @property \yii\mongodb\Connection $mongodb
 */
class MyApplication
{

}

 

Then External Libraries below PHP, right:

+ Point number, just select the directory. Then try in the project:

\Yii::$app->redis->mset();
\Yii::$app->mongodb->createCommand();

There will be automatically prompted.

 

Guess you like

Origin www.cnblogs.com/rxbook/p/11284378.html