MongodbGrammarSpecial.php 440 B

12345678910111213141516171819202122
  1. <?php
  2. class MongodbGrammarSpecial extends EMongoDocument {
  3. public function __construct() {
  4. return self::$db = Yii::app()->mongodb1;
  5. }
  6. public static function model($className = __CLASS__){
  7. return parent::model($className);
  8. }
  9. public function collectionName()
  10. {
  11. return 'english_grammar_special';
  12. }
  13. public function englishTree(){
  14. return $this->findAll();
  15. }
  16. }