__construct() protected method

Creates a new Document that operates on the given Mongo connection and uses the given Configuration.
protected __construct ( Connection $conn = null, Configuration $config = null, Doctrine\Common\EventManager $eventManager = null )
$conn Doctrine\MongoDB\Connection
$config Configuration
$eventManager Doctrine\Common\EventManager
 public function __construct()
 {
     AnnotationDriver::registerAnnotationClasses();
     $config = new Configuration();
     $config->setProxyDir(app_path() . '/storage/cache/Doctrine/Proxies');
     $config->setProxyNamespace('Proxies');
     $config->setHydratorDir(app_path() . '/storage/cache/Doctrine/Hydrators');
     $config->setHydratorNamespace('Hydrators');
     $config->setMetadataDriverImpl(AnnotationDriver::create(app_path() . '/app/Model/Entity'));
     $config->setDefaultDB(config('database.db_name'));
     parent::__construct(new Connection(\Config::get('database.host')), $config);
 }
 public function __construct(Connection $conn = null, Configuration $config = null, EventManager $eventManager = null)
 {
     parent::__construct($conn, $config, $eventManager);
 }