src/wcmf/lib/persistence/impl/DefaultPersistenceFacade.php
public function setMappers($mappers) {
    $this->mappers = $mappers;
    foreach ($mappers as $fqName => $mapper) {
      // register simple type names
      $name = $this->calculateSimpleType($fqName);
      if (!isset($this->mappers[$name])) {
        $this->mappers[$name] = $mapper;
        if (!isset($this->simpleToFqNames[$name])) {
          $this->simpleToFqNames[$name] = $fqName;
        }
        else {
          // if the simple type name already exists, we remove
          // it in order to prevent collisions with the new type
          unset($this->simpleToFqNames[$name]);
        }
      }
      // set logging strategy
      $mapper->setLogStrategy($this->logStrategy);
    }
  }
public function setMappers($mappers) {
    $this->mappers = $mappers;
    foreach ($mappers as $fqName => $mapper) {
      // register simple type names
      $name = $this->calculateSimpleType($fqName);
      if (!isset($this->mappers[$name])) {
        $this->mappers[$name] = $mapper;
        if (!isset($this->simpleToFqNames[$name])) {
          $this->simpleToFqNames[$name] = $fqName;
        }
        else {
          // if the simple type name already exists, we remove
          // it in order to prevent collisions with the new type
          unset($this->simpleToFqNames[$name]);
        }
      }
      // set logging strategy
      $mapper->setLogStrategy($this->logStrategy);
    }
  }
public function setMappers ( $ mappers ) { $ this -> mappers = $ mappers ; foreach ( $ mappers as $ fqName => $ mapper ) { // register simple type names $ name = $ this -> calculateSimpleType ( $ fqName ) ; if ( ! isset ( $ this -> mappers [ $ name ] ) ) { $ this -> mappers [ $ name ] = $ mapper ; if ( ! isset ( $ this -> simpleToFqNames [ $ name ] ) ) { $ this -> simpleToFqNames [ $ name ] = $ fqName ; } else { // if the simple type name already exists, we remove // it in order to prevent collisions with the new type unset ( $ this -> simpleToFqNames [ $ name ] ) ; } } // set logging strategy $ mapper -> setLogStrategy ( $ this -> logStrategy ) ; } }
Set the PersistentMapper instances.
@param $mappers Associative array with the fully qualified
mapped class names as keys and the mapper instances as values
Set the PersistentMapper instances .