示例#1
0
文件: Menu.php 项目: pancke/yyaf
 /**
  * 请求数据检测
  * @return mixed
  */
 public function _checkData($sType = 'add')
 {
     $sMenuName = $this->getParam('sMenuName');
     $sUrl = $this->getParam('sUrl');
     $iParentID = $this->getParam('iParentID');
     $sIcon = $this->getParam('sIcon');
     if (!Util_Validate::isLength($sMenuName, 2, 20)) {
         return $this->showMsg('菜单名长度范围为2到20个字!', false);
     }
     if (!Util_Validate::isUrl($sUrl)) {
         return $this->showMsg('输入的URL不合法!', false);
     }
     $aRow = array('sMenuName' => $sMenuName, 'sUrl' => $sUrl, 'iParentID' => $iParentID, 'sIcon' => $sIcon);
     return $aRow;
 }