<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Edm\Util; use ModStart\Core\Assets\AssetsUtil; use ModStart\Core\Dao\ModelUtil; use ModStart\Core\Util\ArrayUtil; use Module\Edm\Type\EdmRandomType; class EdmRandomUtil { public static function get($PkaS6, $zTlk4) { goto arVAl; MmNHa: return null; goto h3h5r; tqeoS: switch ($ZIYgy['type']) { case EdmRandomType::TEXT: return $ZIYgy['textContent']; case EdmRandomType::IMAGE: return AssetsUtil::fixFull($ZIYgy['imageContent']); case EdmRandomType::RICH: return $ZIYgy['richContent']; } goto MmNHa; arVAl: $b3yWT = ModelUtil::model('edm_random')->where('tags', 'like', "%:{$PkaS6}:%")->where(array('type' => $zTlk4))->get()->toArray(); goto etuvR; etuvR: $ZIYgy = ArrayUtil::random($b3yWT); goto tqeoS; h3h5r: } }