original_string: public static function get($type)
      {
          if (!isset(static::$_modelFactories['Table'])) {
              static::$_modelFactories['Table'] = [TableRegistry::getTableLocator(), 'get'];
          }
  
          if (!isset(static::$_modelFactories[$type])) {
              throw new InvalidArgumentException(sprintf(
                  'Unknown repository type "%s". Make sure you register a type before trying to use it.',
                  $type
              ));
          }
  
          return static::$_modelFactories[$type];
      }
code: public static function get($type)
      {
          if (!isset(static::$_modelFactories['Table'])) {
              static::$_modelFactories['Table'] = [TableRegistry::getTableLocator(), 'get'];
          }
  
          if (!isset(static::$_modelFactories[$type])) {
              throw new InvalidArgumentException(sprintf(
                  'Unknown repository type "%s". Make sure you register a type before trying to use it.',
                  $type
              ));
          }
  
          return static::$_modelFactories[$type];
      }
code_tokens: public static function get ( $ type ) { if ( ! isset ( static :: $ _modelFactories [ 'Table' ] ) ) { static :: $ _modelFactories [ 'Table' ] = [ TableRegistry :: getTableLocator ( ) , 'get' ] ; } if ( ! isset ( static :: $ _modelFactories [ $ type ] ) ) { throw new InvalidArgumentException ( sprintf ( 'Unknown repository type "%s". Make sure you register a type before trying to use it.' , $ type ) ) ; } return static :: $ _modelFactories [ $ type ] ; }
docstring: Get the factory for the specified repository type.
  
  @param string $type The repository type to get the factory for.
  @throws \InvalidArgumentException If the specified repository type has no factory.
  @return callable The factory for the repository type.
docstring_tokens: Get the factory for the specified repository type .