src/Handler/FileHandler.php
public function variantUrlsForTarget(TargetInterface $target, array $variants = [])
    {
        $urls = [
            static::ORIGINAL => $this->storage->url($target->original()),
        ];

        if (in_array(static::ORIGINAL, $variants)) {
            $variants = array_diff($variants, [ static::ORIGINAL ]);
        }

        foreach ($variants as $variant) {
            $urls[ $variant ] = $this->storage->url($target->variant($variant));
        }

        return $urls;
    }
public function variantUrlsForTarget(TargetInterface $target, array $variants = [])
    {
        $urls = [
            static::ORIGINAL => $this->storage->url($target->original()),
        ];

        if (in_array(static::ORIGINAL, $variants)) {
            $variants = array_diff($variants, [ static::ORIGINAL ]);
        }

        foreach ($variants as $variant) {
            $urls[ $variant ] = $this->storage->url($target->variant($variant));
        }

        return $urls;
    }
public function variantUrlsForTarget ( TargetInterface $ target , array $ variants = [ ] ) { $ urls = [ static :: ORIGINAL => $ this -> storage -> url ( $ target -> original ( ) ) , ] ; if ( in_array ( static :: ORIGINAL , $ variants ) ) { $ variants = array_diff ( $ variants , [ static :: ORIGINAL ] ) ; } foreach ( $ variants as $ variant ) { $ urls [ $ variant ] = $ this -> storage -> url ( $ target -> variant ( $ variant ) ) ; } return $ urls ; }
Returns the URLs keyed by the variant keys requested.

@param TargetInterface $target
@param string[]        $variants     keys for variants to include
@return string[]
Returns the URLs keyed by the variant keys requested .