\ArticleModel

Summary

Methods
Properties
Constants
init()
SaveArticle()
Search()
ArticleDetail()
ArticleList()
GetClass()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
__clone()
__construct()
$article
N/A

Properties

Methods

init()

init() : \ArticleModel

获取单一实列

Returns

\ArticleModel

SaveArticle()

SaveArticle(integer|string  $class, string  $title, string  $keyword, string  $content) : integer|false

保存文章

Parameters

integer|string $class

文章分类ID | 新文章分类名

string $title

文章标题

string $keyword

文章关键字

string $content

文章内容

Returns

integer|false —

返回成功后的文章ID或者false

Search()

Search(string  $s, string  $limit) : array

搜索

Parameters

string $s

搜索关键字

string $limit

搜索返回范围

Returns

array

ArticleDetail()

ArticleDetail(integer|string  $articleId = 1) : array

文章详情

Parameters

integer|string $articleId

文章ID

Returns

array

ArticleList()

ArticleList(integer|string  $classId = '0') : array

文章列表

Parameters

integer|string $classId

文章分类ID(默认返回点击量最高的前100篇文章)

Returns

array

GetClass()

GetClass() : array

获取文章分类

Returns

array

__clone()

__clone() 

__construct()

__construct()