20 lines
459 B
PHP
20 lines
459 B
PHP
<?php
|
|
namespace app\api\controller;
|
|
|
|
use app\common\controller\BaseLikeController;
|
|
|
|
|
|
class BaseApiController extends BaseLikeController
|
|
{
|
|
protected int $userId = 0;
|
|
protected array $userInfo = [];
|
|
|
|
public function initialize()
|
|
{
|
|
if (isset($this->request->userInfo) && $this->request->userInfo) {
|
|
$this->userInfo = $this->request->userInfo;
|
|
$this->userId = $this->request->userInfo['user_id'];
|
|
}
|
|
}
|
|
}
|