public static function registerLoader($loader, string ...$contentTypes): FluentDOM\Loaders {
    $loaders = self::getDefaultLoaders();
    if (count($contentTypes) > 0) {
      $lazyLoader = new \FluentDOM\Loader\Lazy();
      foreach ($contentTypes as $contentType) {
        $lazyLoader->add($contentType, $loader);
      }
      $loaders->add($lazyLoader);
    } elseif (is_callable($loader)) {
      self::registerLoader($loader());
    } else {
      $loaders->add($loader);
    }
    self::$_loader = NULL;
    return $loaders;
  }
public static function registerLoader($loader, string ...$contentTypes): FluentDOM\Loaders {
    $loaders = self::getDefaultLoaders();
    if (count($contentTypes) > 0) {
      $lazyLoader = new \FluentDOM\Loader\Lazy();
      foreach ($contentTypes as $contentType) {
        $lazyLoader->add($contentType, $loader);
      }
      $loaders->add($lazyLoader);
    } elseif (is_callable($loader)) {
      self::registerLoader($loader());
    } else {
      $loaders->add($loader);
    }
    self::$_loader = NULL;
    return $loaders;
  }
public static function registerLoader ( $ loader , string ... $ contentTypes ) : FluentDOM \ Loaders { $ loaders = self :: getDefaultLoaders ( ) ; if ( count ( $ contentTypes ) > 0 ) { $ lazyLoader = new \ FluentDOM \ Loader \ Lazy ( ) ; foreach ( $ contentTypes as $ contentType ) { $ lazyLoader -> add ( $ contentType , $ loader ) ; } $ loaders -> add ( $ lazyLoader ) ; } elseif ( is_callable ( $ loader ) ) { self :: registerLoader ( $ loader ( ) ) ; } else { $ loaders -> add ( $ loader ) ; } self :: $ _loader = NULL ; return $ loaders ; }
Register an additional default loader

@param FluentDOM\Loadable|callable $loader
@param string ...$contentTypes
@return FluentDOM\Loaders
Register an additional default loader