src/wcmf/lib/persistence/ObjectId.php
private static function getNumberOfPKs($type) {
    if (!isset(self::$numPkKeys[$type])) {
      $numPKs = 1;
      $persistenceFacade = ObjectFactory::getInstance('persistenceFacade');
      if ($persistenceFacade->isKnownType($type)) {
        $mapper = $persistenceFacade->getMapper($type);
        $numPKs = sizeof($mapper->getPKNames());
      }
      self::$numPkKeys[$type] = $numPKs;
    }
    return self::$numPkKeys[$type];
  }
private static function getNumberOfPKs($type) {
    if (!isset(self::$numPkKeys[$type])) {
      $numPKs = 1;
      $persistenceFacade = ObjectFactory::getInstance('persistenceFacade');
      if ($persistenceFacade->isKnownType($type)) {
        $mapper = $persistenceFacade->getMapper($type);
        $numPKs = sizeof($mapper->getPKNames());
      }
      self::$numPkKeys[$type] = $numPKs;
    }
    return self::$numPkKeys[$type];
  }
private static function getNumberOfPKs ( $ type ) { if ( ! isset ( self :: $ numPkKeys [ $ type ] ) ) { $ numPKs = 1 ; $ persistenceFacade = ObjectFactory :: getInstance ( 'persistenceFacade' ) ; if ( $ persistenceFacade -> isKnownType ( $ type ) ) { $ mapper = $ persistenceFacade -> getMapper ( $ type ) ; $ numPKs = sizeof ( $ mapper -> getPKNames ( ) ) ; } self :: $ numPkKeys [ $ type ] = $ numPKs ; } return self :: $ numPkKeys [ $ type ] ; }
Get the number of primary keys a type has.
@param $type The type
@return Integer (1 if the type is unknown)
Get the number of primary keys a type has .