original_string: public static function factory(Segment $segment, array $periods, array $idSites, $idSiteIsAll = false,
                                     $isMultipleDate = false)
      {
          return StaticContainer::get(ArchiveQueryFactory::class)->factory($segment, $periods, $idSites, $idSiteIsAll,
              $isMultipleDate);
      }
code: public static function factory(Segment $segment, array $periods, array $idSites, $idSiteIsAll = false,
                                     $isMultipleDate = false)
      {
          return StaticContainer::get(ArchiveQueryFactory::class)->factory($segment, $periods, $idSites, $idSiteIsAll,
              $isMultipleDate);
      }
code_tokens: public static function factory ( Segment $ segment , array $ periods , array $ idSites , $ idSiteIsAll = false , $ isMultipleDate = false ) { return StaticContainer :: get ( ArchiveQueryFactory :: class ) -> factory ( $ segment , $ periods , $ idSites , $ idSiteIsAll , $ isMultipleDate ) ; }
docstring: Returns a new Archive instance that will query archive data for the given set of
  sites and periods, using an optional segment.
  
  This method uses an array of Period instances and a Segment instance, instead of strings
  like {@link build()}.
  
  If you want to create an Archive instance using data found in query parameters,
  use {@link build()}.
  
  @param Segment $segment The segment to use. For no segment, use `new Segment('', $idSites)`.
  @param array $periods An array of Period instances.
  @param array $idSites An array of site IDs (eg, `array(1, 2, 3)`).
  @param bool $idSiteIsAll Whether `'all'` sites are being queried or not. If true, then
  the result of querying functions will be indexed by site, regardless
  of whether `count($idSites) == 1`.
  @param bool $isMultipleDate Whether multiple dates are being queried or not. If true, then
  the result of querying functions will be indexed by period,
  regardless of whether `count($periods) == 1`.
  
  @return ArchiveQuery
docstring_tokens: Returns a new Archive instance that will query archive data for the given set of sites and periods using an optional segment .