array( 'kw' => 'INVALID_ID', 'desc' => '无效的主键id', ), self::INVALID_INT => array( 'kw' => 'INVALID_INT', 'desc' => '无效的整数', ), ); } /** * * 根据异常的关键词获取文本型的描述 * @param string $kw * @return false | string */ static public function getTextDescByKW($kw) { $descs = self::getDesc(); if (isset($descs[$kw])) { return $descs[$kw]['desc']; } return false; } }