private static function getDataMapperInstance()
    {
        $instance = Ioc::make(get_called_class());

        if (!$instance->getCollectionName()) {
            throw new NoCollectionNameException();
        }

        return $instance->getDataMapper();
    }
private static function getDataMapperInstance()
    {
        $instance = Ioc::make(get_called_class());

        if (!$instance->getCollectionName()) {
            throw new NoCollectionNameException();
        }

        return $instance->getDataMapper();
    }
private static function getDataMapperInstance ( ) { $ instance = Ioc :: make ( get_called_class ( ) ) ; if ( ! $ instance -> getCollectionName ( ) ) { throw new NoCollectionNameException ( ) ; } return $ instance -> getDataMapper ( ) ; }
Returns the a valid instance from Ioc.

@throws NoCollectionNameException throws exception when has no collection filled

@return mixed
Returns the a valid instance from Ioc .