<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Support\Concern; trait HasVariables { protected $variables = array(); public function varaibles() { return $this->variables; } public function setVariable($glP3G, $cBDsM = null) { if (is_array($glP3G)) { foreach ($glP3G as $lxIPA => $knQyJ) { $this->variables[$lxIPA] = $knQyJ; } } else { $this->variables[$glP3G] = $cBDsM; } } public function getVariable($glP3G, $Rethz = null) { return isset($this->variables[$glP3G]) ? $this->variables[$glP3G] : $Rethz; } }