AbstractModel.class.php
710 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/**
* AbstractModel.class.php
* Model 层基类
* @author: zhuxun37
* @version: $Id$
* @copyright: vchangyi.com
*/
namespace Common\Model;
abstract class AbstractModel extends \Com\Model
{
const PAGING_DEFAULT_PAGE = 1;
const PAGING_DEFAULT_LIMIT = 20;
// 构造方法
public function __construct()
{
parent::__construct();
}
/**
* 毫秒时间戳
* @author <362431947@qq.com>
* @date 2018-10-09
* @return int
*/
public function microtime()
{
list($msec, $sec) = explode(' ', microtime());
$msectime = (float)sprintf('%.0f', (floatval($msec) + floatval($sec)) * 1000);
return $msectime;
}
}