public function make($entityClass, EntityMap $entityMap)
    {
        $driver = $entityMap->getDriver();

        $connection = $entityMap->getConnection();

        $adapter = $this->drivers->getAdapter($driver, $connection);

        $entityMap->setDateFormat($adapter->getDateFormat());

        $mapper = new Mapper($entityMap, $adapter, $this->dispatcher, $this->manager);

        // Fire Initializing Event
        $mapper->fireEvent('initializing', $mapper);

        // Proceed necessary parsing on the EntityMap object
        if (!$entityMap->isBooted()) {
            $entityMap->initialize();
        }

        // Apply Inheritance scope, if necessary
        if ($entityMap->getInheritanceType() == 'single_table') {
            $scope = new SingleTableInheritanceScope($entityMap);
            $mapper->addGlobalScope($scope);
        }

        // Fire Initialized Event
        $mapper->fireEvent('initialized', $mapper);

        return $mapper;
    }
public function make($entityClass, EntityMap $entityMap)
    {
        $driver = $entityMap->getDriver();

        $connection = $entityMap->getConnection();

        $adapter = $this->drivers->getAdapter($driver, $connection);

        $entityMap->setDateFormat($adapter->getDateFormat());

        $mapper = new Mapper($entityMap, $adapter, $this->dispatcher, $this->manager);

        // Fire Initializing Event
        $mapper->fireEvent('initializing', $mapper);

        // Proceed necessary parsing on the EntityMap object
        if (!$entityMap->isBooted()) {
            $entityMap->initialize();
        }

        // Apply Inheritance scope, if necessary
        if ($entityMap->getInheritanceType() == 'single_table') {
            $scope = new SingleTableInheritanceScope($entityMap);
            $mapper->addGlobalScope($scope);
        }

        // Fire Initialized Event
        $mapper->fireEvent('initialized', $mapper);

        return $mapper;
    }
public function make ( $ entityClass , EntityMap $ entityMap ) { $ driver = $ entityMap -> getDriver ( ) ; $ connection = $ entityMap -> getConnection ( ) ; $ adapter = $ this -> drivers -> getAdapter ( $ driver , $ connection ) ; $ entityMap -> setDateFormat ( $ adapter -> getDateFormat ( ) ) ; $ mapper = new Mapper ( $ entityMap , $ adapter , $ this -> dispatcher , $ this -> manager ) ; // Fire Initializing Event $ mapper -> fireEvent ( 'initializing' , $ mapper ) ; // Proceed necessary parsing on the EntityMap object if ( ! $ entityMap -> isBooted ( ) ) { $ entityMap -> initialize ( ) ; } // Apply Inheritance scope, if necessary if ( $ entityMap -> getInheritanceType ( ) == 'single_table' ) { $ scope = new SingleTableInheritanceScope ( $ entityMap ) ; $ mapper -> addGlobalScope ( $ scope ) ; } // Fire Initialized Event $ mapper -> fireEvent ( 'initialized' , $ mapper ) ; return $ mapper ; }
Return a new Mapper instance.

@param string    $entityClass
@param EntityMap $entityMap

@return Mapper
Return a new Mapper instance .