jahau
(Jahau)
1
I’ve got one old “project” that handles exporting reports in certain format based on the user input that I’d like to include to my Yii2 application.
There’s some information here: http://www.yiiframework.com/doc-2.0/guide-tutorial-yii-integration.html
…but I don’t want to make that “project” as a component but include as-is with minimum changes. How can this be achieved?
samdark
(Alexander Makarov)
2
With regular
require "path/to/file.php";
jahau
(Jahau)
3
Does not work, Class ‘app\models\Calculator’ not found. With any class that I try to instantiate from the included php-file. What’s the problem?
samdark
(Alexander Makarov)
4
Do you have a namespace defined inside that class?
jahau
(Jahau)
5
Yes, added yesterday and it started working. Thanks for the help!