{"id":19416713,"url":"https://github.com/lalbert/silex-mongodb","last_synced_at":"2025-04-24T13:32:58.165Z","repository":{"id":57010839,"uuid":"59824927","full_name":"lalbert/silex-mongodb","owner":"lalbert","description":"Simple mongodb service provider for Silex 2.x and official mongodb driver","archived":false,"fork":false,"pushed_at":"2016-05-27T16:00:59.000Z","size":7,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2024-04-02T03:04:16.904Z","etag":null,"topics":["mongodb","silex-mongodb","silex-provider","silex2"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lalbert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-27T10:01:15.000Z","updated_at":"2024-04-02T03:04:16.905Z","dependencies_parsed_at":"2022-08-21T15:10:29.838Z","dependency_job_id":null,"html_url":"https://github.com/lalbert/silex-mongodb","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lalbert%2Fsilex-mongodb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lalbert%2Fsilex-mongodb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lalbert%2Fsilex-mongodb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lalbert%2Fsilex-mongodb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lalbert","download_url":"https://codeload.github.com/lalbert/silex-mongodb/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223954837,"owners_count":17231189,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mongodb","silex-mongodb","silex-provider","silex2"],"created_at":"2024-11-10T13:04:14.347Z","updated_at":"2024-11-10T13:04:15.061Z","avatar_url":"https://github.com/lalbert.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# silex-mongodb\nSimple mongodb service provider for Silex 2.x and official mongodb driver\n\n## Features\n\nThis library provides easy access to a MongoDB database using the extension ([mongodb](http://php.net/manual/en/set.mongodb.php), **not [mongo](http://php.net/manual/en/book.mongo.php)**) and the official [MongoDB PHP driver](https://github.com/mongodb/mongo-php-library).\n\n## Requirements\n\n* PHP 5.4+\n* [mongodb official PECL extension](https://secure.php.net/mongodb)\n\n## Installation\n\nThe best way to install the component is using [Composer](https://getcomposer.org/)\n\n    $ composer require lalbert/silex-mongodb\n\n## Usage\n\n### Register service\n\n``` {.php}\n$app-\u003eregister(new MongoDBServiceProvider());\n```\n\nYou can also pass configuration settings :\n\n_See http://php.net/manual/en/mongodb-driver-manager.construct.php for options allowed._\n\n``` {.php}\n$app-\u003eregister(new MongoDBServiceProvider(), [\n    'mongodb.config' =\u003e [\n        'server' =\u003e 'mongodb://localhost:27017',\n        'options' =\u003e [],\n        'driverOptions' =\u003e [],\n    ]\n]);\n```\n\nYour application :\n\n``` {.php}\n$document = ['key' =\u003e 'value'];\n\n$app['mongodb']\n  -\u003emydatabase\n  -\u003emycollection\n  -\u003einsert($document)\n;\n```\n\n_See official [MongoDB PHP Library documentation](http://mongodb.github.io/mongo-php-library/)_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flalbert%2Fsilex-mongodb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flalbert%2Fsilex-mongodb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flalbert%2Fsilex-mongodb/lists"}