mirror of
https://gh.wpcy.net/https://github.com/netcccyun/easypanel.git
synced 2026-04-23 12:02:23 +08:00
40 lines
No EOL
746 B
PHP
40 lines
No EOL
746 B
PHP
<?php
|
|
load_lib('pub:flow');
|
|
class FlowAPI extends API
|
|
{
|
|
private $flowobj;
|
|
|
|
public function __construct()
|
|
{
|
|
$flowobj = new flow('global.db');
|
|
$this->flowobj = $flowobj;
|
|
}
|
|
|
|
public function getFlow($table, $name, $t)
|
|
{
|
|
return $this->flowobj->getFlow($table, $name, $t);
|
|
}
|
|
|
|
public function getListflow($table, $t)
|
|
{
|
|
return $this->flowobj->getListflow($table, $t);
|
|
}
|
|
|
|
public function getMonthFlow($name, $t)
|
|
{
|
|
$result = $this->flowobj->getMonthFlow($name, $t);
|
|
return $result;
|
|
}
|
|
|
|
/**
|
|
* 得到虚拟主机当前月流量
|
|
* @param $name
|
|
* @return Ambigous <mixed, boolean>
|
|
*/
|
|
public function getCurrentMonthFlow($name)
|
|
{
|
|
return $this->getMonthFlow($name, date('Ym'));
|
|
}
|
|
}
|
|
|
|
?>
|