<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Tracking\Util; use Illuminate\Support\Facades\Cache; use ModStart\Core\Dao\ModelUtil; use ModStart\Core\Util\TreeUtil; class TrackingCodeProcessUtil { public static function clearCache() { Cache::forget('TrackingCodeProcesses'); } public static function all() { return Cache::rememberForever('TrackingCodeProcesses', function () { return ModelUtil::all('tracking_code_process'); }); } public static function codeProcessTree() { $Kq4sv = self::all(); return TreeUtil::nodesToTree($Kq4sv); } public static function get($D4D3g) { foreach (self::all() as $IeOEl) { if ($IeOEl['id'] == $D4D3g) { return $IeOEl; } } return null; } }