src/wcmf/lib/model/mapper/impl/AbstractRDBMapper.php
protected static function getMapper($type, $strict=true) {
    $persistenceFacade = ObjectFactory::getInstance('persistenceFacade');
    $mapper = $persistenceFacade->getMapper($type);
    if ($strict && !($mapper instanceof RDBMapper)) {
      throw new PersistenceException('Only PersistenceMappers of type RDBMapper are supported.');
    }
    return $mapper;
  }
protected static function getMapper($type, $strict=true) {
    $persistenceFacade = ObjectFactory::getInstance('persistenceFacade');
    $mapper = $persistenceFacade->getMapper($type);
    if ($strict && !($mapper instanceof RDBMapper)) {
      throw new PersistenceException('Only PersistenceMappers of type RDBMapper are supported.');
    }
    return $mapper;
  }
protected static function getMapper ( $ type , $ strict = true ) { $ persistenceFacade = ObjectFactory :: getInstance ( 'persistenceFacade' ) ; $ mapper = $ persistenceFacade -> getMapper ( $ type ) ; if ( $ strict && ! ( $ mapper instanceof RDBMapper ) ) { throw new PersistenceException ( 'Only PersistenceMappers of type RDBMapper are supported.' ) ; } return $ mapper ; }
Get the mapper for a Node and optionally check if it is a supported one.
@param $type The type of Node to get the mapper for
@param $strict Boolean indicating if the mapper must be an instance of RDBMapper (default true)
@return RDBMapper instance
Get the mapper for a Node and optionally check if it is a supported one .