private function getByClassName($className)
    {
        if ($className === '') {
            throw new \InvalidArgumentException('$className must not be empty.', 1331488868);
        }
        $unifiedClassName = self::unifyClassName($className);

        if (!isset($this->mappers[$unifiedClassName])) {
            if (!class_exists($className, true)) {
                throw new \InvalidArgumentException(
                    'No mapper class "' . $className . '" could be found.'
                );
            }

            /** @var \Tx_Oelib_DataMapper $mapper */
            $mapper = GeneralUtility::makeInstance($unifiedClassName);
            $this->mappers[$unifiedClassName] = $mapper;
        } else {
            /** @var \Tx_Oelib_DataMapper $mapper */
            $mapper = $this->mappers[$unifiedClassName];
        }

        if ($this->testingMode) {
            $mapper->setTestingFramework($this->testingFramework);
        }
        if ($this->denyDatabaseAccess) {
            $mapper->disableDatabaseAccess();
        }

        return $mapper;
    }
private function getByClassName($className)
    {
        if ($className === '') {
            throw new \InvalidArgumentException('$className must not be empty.', 1331488868);
        }
        $unifiedClassName = self::unifyClassName($className);

        if (!isset($this->mappers[$unifiedClassName])) {
            if (!class_exists($className, true)) {
                throw new \InvalidArgumentException(
                    'No mapper class "' . $className . '" could be found.'
                );
            }

            /** @var \Tx_Oelib_DataMapper $mapper */
            $mapper = GeneralUtility::makeInstance($unifiedClassName);
            $this->mappers[$unifiedClassName] = $mapper;
        } else {
            /** @var \Tx_Oelib_DataMapper $mapper */
            $mapper = $this->mappers[$unifiedClassName];
        }

        if ($this->testingMode) {
            $mapper->setTestingFramework($this->testingFramework);
        }
        if ($this->denyDatabaseAccess) {
            $mapper->disableDatabaseAccess();
        }

        return $mapper;
    }
private function getByClassName ( $ className ) { if ( $ className === '' ) { throw new \ InvalidArgumentException ( '$className must not be empty.' , 1331488868 ) ; } $ unifiedClassName = self :: unifyClassName ( $ className ) ; if ( ! isset ( $ this -> mappers [ $ unifiedClassName ] ) ) { if ( ! class_exists ( $ className , true ) ) { throw new \ InvalidArgumentException ( 'No mapper class "' . $ className . '" could be found.' ) ; } /** @var \Tx_Oelib_DataMapper $mapper */ $ mapper = GeneralUtility :: makeInstance ( $ unifiedClassName ) ; $ this -> mappers [ $ unifiedClassName ] = $ mapper ; } else { /** @var \Tx_Oelib_DataMapper $mapper */ $ mapper = $ this -> mappers [ $ unifiedClassName ] ; } if ( $ this -> testingMode ) { $ mapper -> setTestingFramework ( $ this -> testingFramework ) ; } if ( $ this -> denyDatabaseAccess ) { $ mapper -> disableDatabaseAccess ( ) ; } return $ mapper ; }
Retrieves a dataMapper by class name.

@param string $className the name of an existing mapper class, must not be empty

@return \Tx_Oelib_DataMapper the requested mapper instance

@throws \InvalidArgumentException
Retrieves a dataMapper by class name .