Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

In this Discussion

How to access Vanilla's functions and classes inside console application?

neelkanthneelkanth New
edited September 13 in Development

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

Sign In or Register to comment.