\Common\ApiCategoryApi

Summary

Methods
Properties
Constants
get_category()
get_category_name()
get_category_title()
get_parent_category()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

get_category()

get_category(integer  $id, string  $field = null) : string

获取分类信息并缓存分类

Parameters

integer $id

分类ID

string $field

要获取的字段名

Returns

string —

分类信息

get_category_name()

get_category_name(  $id) 

Parameters

$id

get_category_title()

get_category_title(  $id) 

Parameters

$id

get_parent_category()

get_parent_category(integer  $cid) : array

获取参数的所有父级分类

Parameters

integer $cid

分类id

Returns

array —

参数分类和父类的信息集合