<?php

namespace Application\Service\Extension\Helper;

use Application\Service\Extension\Laminas;

class EdcHelper
{
    /**
     * 是否开启了edc
     */
    public static function isEdc(int $itemFid): bool
    {
        $query = Laminas::$serviceManager->itemInfo->memoryCache()->fetchOne([
            'where' => ['id' => $itemFid]
        ]);

        return (bool)$query['is_edc'];
    }
}