Work on SSL and Host accounts
This commit is contained in:
@@ -2,9 +2,11 @@
|
||||
|
||||
namespace App\Models\Service;
|
||||
|
||||
use App\Interfaces\ServiceItem;
|
||||
use App\Models\Base\ServiceType;
|
||||
use App\Traits\NextKey;
|
||||
|
||||
class SSL extends \App\Models\Base\ServiceType
|
||||
class SSL extends ServiceType implements ServiceItem
|
||||
{
|
||||
use NextKey;
|
||||
const RECORD_ID = 'service__ssl';
|
||||
@@ -13,15 +15,9 @@ class SSL extends \App\Models\Base\ServiceType
|
||||
|
||||
protected $_o = NULL;
|
||||
|
||||
public function tld()
|
||||
{
|
||||
return $this->belongsTo(DomainTld::class,'domain_tld_id');
|
||||
}
|
||||
|
||||
public function getSSLAttribute()
|
||||
{
|
||||
if (is_null($this->_o))
|
||||
{
|
||||
if (is_null($this->_o)) {
|
||||
$this->_o = new \App\Classes\SSL;
|
||||
|
||||
if ($this->cert)
|
||||
@@ -30,14 +26,24 @@ class SSL extends \App\Models\Base\ServiceType
|
||||
$this->_o->csr($this->csr);
|
||||
if ($this->pk)
|
||||
$this->_o->key($this->pk);
|
||||
|
||||
}
|
||||
|
||||
return $this->_o;
|
||||
}
|
||||
|
||||
public function getNameAttribute()
|
||||
public function getServiceDescriptionAttribute(): string
|
||||
{
|
||||
return $this->ssl->dn;
|
||||
}
|
||||
|
||||
public function getServiceNameAttribute(): string
|
||||
{
|
||||
return $this->ssl->cn;
|
||||
}
|
||||
|
||||
public function inContract(): bool
|
||||
{
|
||||
// N/A
|
||||
return FALSE;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user