/** * 获取“使用公共的页脚”所有选项 * @return array */ public static function getUseFooterEnum() { static $enum = null; if ($enum === null) { $enum = array(self::USE_FOOTER_Y => Lang::_('SRV_ENUM_GLOBAL_YES'), self::USE_FOOTER_N => Lang::_('SRV_ENUM_GLOBAL_NO')); } return $enum; }
/** * 获取“使用公共的页脚”验证规则 * @param mixed $value * @return array */ public function getUseFooterRule($value) { $enum = DataTopic::getUseFooterEnum(); return array('InArray' => new validator\InArrayValidator($value, array_keys($enum), sprintf(Lang::_('SRV_FILTER_TOPIC_USE_FOOTER_INARRAY'), implode(', ', $enum)))); }