Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
bc9e57b2
Commit
bc9e57b2
authored
Dec 06, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed readme.
parent
bce353bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
23 deletions
+10
-23
README.md
extensions/mongodb/README.md
+10
-23
No files found.
extensions/mongodb/README.md
View file @
bc9e57b2
Yii 2.0 Public Preview - MongoDb Extension
MongoDb Extension for Yii 2
===========================
===============
===========================
Thank you for choosing Yii - a high-performance component-based PHP framework.
This extension provides the
[
MongoDB
](
http://www.mongodb.org/
)
integration for the Yii2 framework.
If you are looking for a production-ready PHP framework, please use
[
Yii v1.1
](
https://github.com/yiisoft/yii
)
.
Yii 2.0 is still under heavy development. We may make significant changes
without prior notices.
**Yii 2.0 is not ready for production use yet.**
[
![Build Status
](
https://secure.travis-ci.org/yiisoft/yii2.png
)
](http://travis-ci.org/yiisoft/yii2)
This is the yii2-sphinx extension.
Installation
Installation
------------
------------
This extension requires
[
MongoDB PHP Extension
](
http://us1.php.net/manual/en/book.mongo.php
)
version 1.3.0 or higher.
The preferred way to install this extension is through
[
composer
](
http://getcomposer.org/download/
)
.
The preferred way to install this extension is through
[
composer
](
http://getcomposer.org/download/
)
.
Either run
Either run
```
```
php composer.phar require yiisoft/yii2-mongodb "*"
php composer.phar require yiisoft/yii2-mongodb "*"
```
```
or add
or add
```
```
"yiisoft/yii2-mongodb": "*"
"yiisoft/yii2-mongodb": "*"
```
```
to the require section of your composer.json.
*Note: You might have to run `php composer.phar selfupdate`*
to the require section of your composer.json.
Usage & Documentation
Usage & Documentation
---------------------
---------------------
This extension adds
[
MongoDB
](
http://www.mongodb.org/
)
data storage support for the Yii2 framework.
Note: extension requires
[
MongoDB PHP Extension
](
http://us1.php.net/manual/en/book.mongo.php
)
version 1.3.0 or higher.
To use this extension, simply add the following code in your application configuration:
To use this extension, simply add the following code in your application configuration:
```
php
```
php
...
@@ -82,7 +70,7 @@ class Customer extends ActiveRecord
...
@@ -82,7 +70,7 @@ class Customer extends ActiveRecord
}
}
```
```
You can use
[
[\yii\data\ActiveDataProvider
]
] with
the
[
[\yii\mongodb\Query
]
] and
[
[\yii\mongodb\ActiveQuery
]
]:
You can use
[
[\yii\data\ActiveDataProvider
]
] with
[
[\yii\mongodb\Query
]
] and
[
[\yii\mongodb\ActiveQuery
]
]:
```
php
```
php
use
yii\data\ActiveDataProvider
;
use
yii\data\ActiveDataProvider
;
...
@@ -113,4 +101,4 @@ $models = $provider->getModels();
...
@@ -113,4 +101,4 @@ $models = $provider->getModels();
```
```
This extension supports
[
MongoGridFS
](
http://docs.mongodb.org/manual/core/gridfs/
)
via
This extension supports
[
MongoGridFS
](
http://docs.mongodb.org/manual/core/gridfs/
)
via
classes at namespace "
\y
ii
\m
ongo
\f
ile".
classes under namespace "
\y
ii
\m
ongodb
\f
ile".
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment