Commit 8c5e67ab authored by 王源's avatar 王源
Browse files

添加GraphQL工具类

parent 2bad7f8a
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
<?php
/**
 * Created by PhpStorm.
 * User: Zero
 * Time: 2021/1/14 9:16
 */

namespace Meibuyu\Micro\Shopify\tools;

class GraphQL
{

    public static function parseDeliveryProfileId($gid)
    {
        if ($gid && stripos($gid, 'gid://shopify/DeliveryProfile/') !== false) {
            $gid = str_replace('gid://shopify/DeliveryProfile/', '', $gid);
        }
        return (int)$gid;
    }

}