Permalink
Browse files

Added `ObjectManager` interface.

  • Loading branch information...
1 parent 76f8221 commit 1832b99ee57a427fc7ab432d3ebe30c00c5ab9d2 @marijn committed Sep 27, 2011
@@ -5,6 +5,7 @@
use Doctrine\Common\DataFixtures\SharedFixtureInterface;
use Doctrine\Common\DataFixtures\FixtureInterface;
use Doctrine\Common\DataFixtures\ReferenceRepository;
+use Doctrine\Common\Persistence\ObjectManager;
/**
* Abstract fixture executor.
@@ -28,9 +29,9 @@
/**
* Loads an instance of reference repository
*
- * @param object $manager
+ * @param Doctrine\Common\Persistence\ObjectManager $manager
*/
- public function __construct($manager)
+ public function __construct(ObjectManager $manager)
{
$this->referenceRepository = new ReferenceRepository($manager);
}
@@ -79,10 +80,10 @@ public function log($message)
/**
* Load a fixture with the given persistence manager.
*
- * @param object $manager
+ * @param Doctrine\Common\Persistence\ObjectManager $manager
* @param FixtureInterface $fixture
*/
- public function load($manager, FixtureInterface $fixture)
+ public function load(ObjectManager $manager, FixtureInterface $fixture)
{
if ($this->logger) {
$this->log('loading ' . get_class($fixture));
@@ -19,6 +19,8 @@
namespace Doctrine\Common\DataFixtures;
+use Doctrine\Common\Persistence\ObjectManager;
+
/**
* Interface contract for fixture classes to implement.
*
@@ -29,7 +31,7 @@
/**
* Load data fixtures with the passed EntityManager
*
- * @param object $manager
+ * @param Doctrine\Common\Persistence\ObjectManager $manager
*/
- public function load($manager);
+ public function load(ObjectManager $manager);
}
@@ -19,6 +19,8 @@
namespace Doctrine\Common\DataFixtures;
+use Doctrine\Common\Persistence\ObjectManager;
+
/**
* ReferenceRepository class manages references for
* fixtures in order to easily support the relations
@@ -48,16 +50,16 @@ class ReferenceRepository
/**
* Currently used object manager
*
- * @var object - object manager
+ * @var Doctrine\Common\Persistence\ObjectManager
*/
private $manager;
/**
* Initialize the ReferenceRepository
*
- * @param object $manager
+ * @param Doctrine\Common\Persistence\ObjectManager $manager
*/
- public function __construct($manager)
+ public function __construct(ObjectManager$manager)
{
$this->manager = $manager;
}

0 comments on commit 1832b99

Please sign in to comment.