PHP Class ARArea

Author: Administrator
Inheritance: extends Area
Show file Open project: yinhe/yincart Class Usage Examples

Public Methods

Method Description
getAreas ( int/null $pid = null, integer $grade = self::GRADE_PROVINCE ) : array 获取子市区的键值对列表
getChildOptionStr ( integer $pid, integer $grade ) 得到子市区的下拉选项
getName ( $id, $grade = self::GRADE_CITY ) 根据id和级别获取分类
model ( $className = __CLASS__ )

Method Details

getAreas() public static method

获取子市区的键值对列表
public static getAreas ( int/null $pid = null, integer $grade = self::GRADE_PROVINCE ) : array
$pid int/null
$grade integer 等级
return array

getChildOptionStr() public static method

得到子市区的下拉选项
public static getChildOptionStr ( integer $pid, integer $grade )
$pid integer
$grade integer

getName() public static method

根据id和级别获取分类
public static getName ( $id, $grade = self::GRADE_CITY )

model() public static method

public static model ( $className = __CLASS__ )