企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
### \_\_construct **构造函数** ~~~ function __construct() { //加入安全校验类 $this->sconfig = new model_common_securityUtil ( $this->objName ); $classname = "model_" . $this->objPath . "_" . $this->objName; $this->service = new $classname (); $this->show = new show (); if(isset($this->lang)){ $lang=empty($_SESSION['lang'])?"chinese":$_SESSION['lang']; $langModel=$this->lang; $this->langUtil=new resources_langUtil($lang,$langModel); $this->service->langUtil=$this->langUtil;//让service也能使用 $commonLangArr=$this->langUtil->commonLangArr; $modelLangArr=$this->langUtil->modelLangArr; if(is_array($commonLangArr)){ foreach($commonLangArr as $k=>$v){ $this->assign ( "common_".$k, $v );//加上lang前缀,用于区分其他属性 } } if(is_array($modelLangArr)){ foreach($modelLangArr as $k=>$v){ $this->assign ( $langModel."_".$k, $v );//加上lang前缀,用于区分其他属性 } } } } ~~~