Sokil\Mongo\Document::getId PHP Method

getId() public method

public getId ( )
    public function getId()
    {
        return $this->get('_id');
    }

Usage Example

Example #1
0
 public function clearRevisions()
 {
     $documentId = $this->document->getId();
     $this->getRevisionsCollection()->deleteDocuments(function (Expression $expression) use($documentId) {
         /* @var $expression \Sokil\Mongo\Expression */
         return $expression->where('__documentId__', $documentId);
     });
     return $this;
 }
All Usage Examples Of Sokil\Mongo\Document::getId