Skip to content
This repository has been archived by the owner on Nov 11, 2020. It is now read-only.

Commit

Permalink
Merge pull request #157 from crystalservice/1.0.x
Browse files Browse the repository at this point in the history
Fix createCollection event dispatching
  • Loading branch information
jmikola committed Mar 27, 2014
2 parents 1078503 + 4f06d4c commit d811f2f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Doctrine/MongoDB/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
namespace Doctrine\MongoDB;

use Doctrine\Common\EventManager;
use Doctrine\MongoDB\Event\CreateCollectionEventArgs;
use Doctrine\MongoDB\Event\EventArgs;
use Doctrine\MongoDB\Util\ReadPreference;

Expand Down Expand Up @@ -128,7 +129,7 @@ public function createCollection($name, $capped = false, $size = 0, $max = 0)
$result = $this->selectCollection($name);

if ($this->eventManager->hasListeners(Events::postCreateCollection)) {
$this->eventManager->dispatchEvent(Events::postCreateCollection, new EventArgs($this, $prefix));
$this->eventManager->dispatchEvent(Events::postCreateCollection, new EventArgs($this, $result));
}

return $result;
Expand Down

0 comments on commit d811f2f

Please sign in to comment.