初始化仓库
This commit is contained in:
39
common/core/Application.php
Normal file
39
common/core/Application.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
namespace common\core;
|
||||
|
||||
use common\models\Mall;
|
||||
use yii\base\Exception;
|
||||
|
||||
/**
|
||||
* Trait Application
|
||||
* @package common\core
|
||||
*/
|
||||
trait Application
|
||||
{
|
||||
private $hostInfo;
|
||||
private $baseUrl;
|
||||
|
||||
public function getHostInfo()
|
||||
{
|
||||
if ($this->hostInfo) {
|
||||
return $this->hostInfo;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
public function setHostInfo($hostInfo)
|
||||
{
|
||||
$this->hostInfo = $hostInfo;
|
||||
}
|
||||
|
||||
public function getBaseUrl()
|
||||
{
|
||||
if ($this->baseUrl) {
|
||||
return $this->baseUrl;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
public function setBaseUrl($baseUrl)
|
||||
{
|
||||
$this->baseUrl = $baseUrl;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user