Ejemplo n.º 1
0
 /**
  * @since v1.0
  * @see CBehavior::attach()
  */
 public function attach($owner)
 {
     parent::attach($owner);
     // Test if we have correct embding class
     if (!is_subclass_of($this->arrayDocClassName, 'EMongoEmbeddedDocument')) {
         throw new CException(Yii::t('yii', get_class($testObj) . ' is not a child class of EMongoEmbeddedDocument!'));
     }
     $this->parseExistingArray();
 }
 /**
  * @since v1.0
  * @see CBehavior::attach()
  */
 public function attach($owner)
 {
     // Test if we have correct embding class
     if (!is_subclass_of($this->arrayDocClassName, 'EMongoEmbeddedDocument')) {
         throw new EMongoException(Yii::t('yii', $this->arrayDocClassName . ' is not a child class of EMongoEmbeddedDocument.'));
     }
     $this->_embeddedOwner = !$owner instanceof EMongoDocument;
     parent::attach($owner);
     $this->parseExistingArray();
 }