K
K
Konstantin Marchenko2019-03-07 11:00:16
Yii
Konstantin Marchenko, 2019-03-07 11:00:16

Why does not see the class in the component?

Hello!
I install an application to work with Google drive:
https://github.com/la-haute-societe/yii2-flysystem...
I do:

php composer.phar require --prefer-dist la-haute-societe/yii2-flysystem-google-drive "~1.0.0"

Everything seems to be ok! Settled! BUT:
I write in the main.php file in components:
'googleDrive' => [
            'class' => 'lhs\Yii2FlysystemGoogleDrive',
            'clientId'     => '***',
            'clientSecret' => '***',
            'refreshToken' => 'xxx YOU REFRESH TOKEN xxx',
            // 'rootFolderId' => 'xxx ROOT FOLDER ID xxx'
        ],

Next I try $contents = Yii::$app->googleDrive->listContents();
Writes: Class 'lhs\Yii2FlysystemGoogleDrive' not found
Where to dig?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
padlyuck, 2019-03-07
@rifer

'googleDrive' => [
            'class' => 'lhs\Yii2FlysystemGoogleDrive\GoogleDriveFilesystem',
            'clientId'     => '***',
            'clientSecret' => '***',
            'refreshToken' => 'xxx YOU REFRESH TOKEN xxx',
            // 'rootFolderId' => 'xxx ROOT FOLDER ID xxx'
        ],

D
Dmitry Bay, 2019-03-07
@kawabanga

I don't want to sound like a bore, but you're importing a library that consists of a couple of dozens of not-so-important code. The library has only one initial commit and is not required.
Make your own component based on this file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question