Skip to content

Commit

Permalink
Merge pull request #151 from fajnalowiec/master
Browse files Browse the repository at this point in the history
pass validator to optionbs of document creation
  • Loading branch information
sokil authored Jun 14, 2017
2 parents a117d8e + 0ef975e commit eaea98f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Collection/Definition.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,15 @@ public function getExpressionClass()

public function getMongoCollectionOptions()
{
return array(
$result = array(
'capped' => $this->capped,
'size' => $this->size,
'max' => $this->max,
'max' => $this->max,
);
if (isset($this->options['validator'])) {
$result['validator'] = $this->options['validator'];
}
return $result;
}

public function getOptions()
Expand Down

0 comments on commit eaea98f

Please sign in to comment.