vd/app/Core/Dipper.php
2018-11-06 16:07:41 +08:00

81 lines
1.3 KiB
PHP

<?php
namespace App\Core;
use App\Models\Account\Account;
use Illuminate\Support\Facades\App;
use App\Exceptions\NotExistException;
use App\Domains\Auth\Services\AdminAuthService;
use App\Domains\Account\Services\AccountService;
/**
* Application/Account/Config 全局代理
*/
class Dipper
{
/**
* 账号实例
*
* @var Account
*/
public $account;
/**
* 配置实例
*
* @var array
*/
public $config;
/**
* 初始化后端用户
*
* @param string $key
* @param boolean $force
* @return Account
*/
public function initAccount()
{
if ($this->account) {
return $this->account;
}
return app('auth:admin')->authenticate();
}
/**
* 获取站点配置
*
* @return array
*/
public function getConfig($key = null)
{
}
/**
* 设置站点配置
*
* @param string $key;
* @param string|array $value;
*
* @return boolean
*/
public function setConfig($key, $value)
{
}
/**
* Set 账号实例
*
* @param Account $account 账号实例
*
* @return self
*/
public function setAccount(Account $account)
{
$this->account = $account;
return $this;
}
}