public static function getWeekAccountAll($user_id) { $start_date = BaseController::getWeekFirstDate(time()); $end_date = BaseController::getWeekLastDate(time()); $datas = self::find()->where(['user_id' => $user_id])->andWhere(['>=', 'date', $start_date])->andWhere(['<=', 'date', $end_date])->sum('value'); return $datas; }
public function __construct() { parent::init(); $this->setProviderName(); $this->providerModel = ModelFactory::build(self::MODULE_NAME, 'Lastfm'); $providerConfig = ConfigHelper::loadConfigs($this->providerName); $this->providerModel->setProviderConfigs($providerConfig); $this->providerModel->setParams($this->router->getParams()); $jsonResponse = $this->providerModel->call($this->router->getActionName()); $this->sendResponse($jsonResponse); }
function __construct() { parent::__construct(); $this->auth = app()->auth(); $this->user = new User(); }
public function __construct() { // Call parent construct to load the config parent::__construct(); }
function __construct() { parent::__construct(); $this->uid = intval($_GET['uid']); $this->username = trim($_GET['username']); }