How to access Vanilla's functions and classes inside console application?
Hello,
Recently I am given a task to migrate our Vanilla's MySQL database into Mongo DB for analytics purpose. The data is huge and I decided to make a console based application for this and for the same I am using Symfony's Console Component (https://symfony.com/doc/3.4/console.html).
Everything was going fine until I tried to use couple of Vanilla's methods such as c() for accessing config and UserModel to fetch users inside the code of the console application.
While accessing c()
it gives me following error message:
In Container.php line 448:
Class Config does not exist
and while creating object of UserModel ($d = new \UserModel();
) i get to see:
PHP Fatal error: Uncaught Error: Class 'UserModel' not found
Can any one please help me out here.
Thanks.
Comments
There has been a similar question recently: https://open.vanillaforums.com/discussion/comment/253867#Comment_253867