R
R
Roman2015-08-21 15:07:21
Yii
Roman, 2015-08-21 15:07:21

3rd party library not included in yii2?

It’s not like it’s impossible to connect a third-party SDK (I took it here https://www.wsdltophp.com/Wsdls/c1f4b157ee50e17546... ) I threw it into the vendor folder, after which I simply connected require_once (Yii::getAlias )
in the model where I need it
('@vendor/microbilt/MicroBiltAutoload.php'));
but it doesn't work
Class 'common\models\MicroBiltWsdlClass' not found
How can I even include it? (by the way, she doesn't have a namespace)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vlad Pasechnik, 2015-08-27
@xr0m3oz

First, put yourself a normal IDE.
Secondly, nothing needs to be thrown and changed into the vendor folder. All this can be done only through the composer.
If it so happened that there are no sources on github, then drop it into any other folder.
Next.. You are calling the MicroBiltWsdlClass class while in the 'common\models' namespace. Then you need to "exit" it.
For this we write...

$obj = new \MicroBiltWsdlClass();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question