public static function byNames(
        Client $client,
        array $names,
        string $orderBy = self::ORDER_NAME,
        bool $hideEmpty = true
    ): array {
        if (!self::isValidOrderingMethod($orderBy)) {
            throw new InvalidArgumentException('Invalid order method');
        }

        $query = [
            'search' => [
                'order' => $orderBy,
                'hide_empty' => $hideEmpty === true ? 'yes' : 'no',
                'name' => implode(',', $names),
            ],
        ];

        $tagsAsArrays = $client->sendRequest(
            self::ENDPOINT,
            $query
        );

        return array_map(function (array $tag): self {
            return self::fromArray($tag);
        }, $tagsAsArrays);
    }
public static function byNames(
        Client $client,
        array $names,
        string $orderBy = self::ORDER_NAME,
        bool $hideEmpty = true
    ): array {
        if (!self::isValidOrderingMethod($orderBy)) {
            throw new InvalidArgumentException('Invalid order method');
        }

        $query = [
            'search' => [
                'order' => $orderBy,
                'hide_empty' => $hideEmpty === true ? 'yes' : 'no',
                'name' => implode(',', $names),
            ],
        ];

        $tagsAsArrays = $client->sendRequest(
            self::ENDPOINT,
            $query
        );

        return array_map(function (array $tag): self {
            return self::fromArray($tag);
        }, $tagsAsArrays);
    }
public static function byNames ( Client $ client , array $ names , string $ orderBy = self :: ORDER_NAME , bool $ hideEmpty = true ) : array { if ( ! self :: isValidOrderingMethod ( $ orderBy ) ) { throw new InvalidArgumentException ( 'Invalid order method' ) ; } $ query = [ 'search' => [ 'order' => $ orderBy , 'hide_empty' => $ hideEmpty === true ? 'yes' : 'no' , 'name' => implode ( ',' , $ names ) , ] , ] ; $ tagsAsArrays = $ client -> sendRequest ( self :: ENDPOINT , $ query ) ; return array_map ( function ( array $ tag ) : self { return self :: fromArray ( $ tag ) ; } , $ tagsAsArrays ) ; }
Search tags by names.

@param Client   $client
@param string[] $names
@param string   $orderBy
@param bool     $hideEmpty

@return Tag[]
Search tags by names .