I'm trying to setup MongoDB collection for my PhalconPHP application.
I have the mongo and collectionManager set up.
$di->set('collectionManager', function(){
return new Phalcon\Mvc\Collection\Manager();
}, true);
//MongoDB Database
$di->set('mongo', function() {
$mongo = new MongoClient("localhost:27017");
return $mongo->selectDb("test");
}, true);
I have a model
class User extends \Phalcon\Mvc\Collection {
....
}
Then I got this error
Unexpected value type: expected object implementing Phalcon\Mvc\ModelInterface, object of type MyApp\Models\User given