unsetField() public method

public unsetField ( $selector )
示例#1
0
 /**
  * Remove field
  * 
  * @param string $fieldName field name
  * @return \Sokil\Mongo\Document
  */
 public function unsetField($fieldName)
 {
     if (!$this->has($fieldName)) {
         return $this;
     }
     parent::unsetField($fieldName);
     if ($this->getId()) {
         $this->operator->unsetField($fieldName);
     }
     return $this;
 }