Download the PHP package shockraver/mongodb without Composer
On this page you can find all versions of the php package shockraver/mongodb. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download shockraver/mongodb
More information about shockraver/mongodb
Files in shockraver/mongodb
Package mongodb
Short Description An Mongodb datasource for CakePHP 3 and 4
License MIT
Informations about the package mongodb
Mongodb for Cakephp 3 and 4
An Mongodb datasource for CakePHP 3 and 4
Installing via composer
Install composer and run:
Connecting the Plugin to your application
add the following line in your config/bootstrap.php to tell your application to load the plugin:
Defining a connection
Now, you need to set the connection in your config/app.php file:
SSH tunnel variables (starting with 'ssh_')
If you want to connect to MongoDB using a SSH tunnel, you need to set additional variables in your Datasource. Some variables are unnecessary, depending on how you intend to connect. IF you're connecting using a SSH key file, the and variables are necessary and the variable is unnecessary. If you're connecting using a text-based password (which is not a wise idea), the reverse is true. The function needs, at minimum, , and one method of authentication to establish a SSH tunnel.
Models
After that, you need to load Giginc\Mongodb\ORM\Table in your tables class:
Observations
The function find() works only in the old fashion way. So, if you want to find something, you to do like the example:
You can also use the advanced conditions of MongoDB using the MongoDB\BSON
namespace
LICENSE
All versions of mongodb with dependencies
ext-mongodb Version *
cakephp/cakephp Version ^3.10|^4.0
mongodb/mongodb Version ~1.20.0