Skip to content

Commit

Permalink
Merge pull request #1 from Fnici/master
Browse files Browse the repository at this point in the history
Accepted
  • Loading branch information
InterNetX authored Feb 26, 2020
2 parents 049ca79 + 74eba85 commit 7d0b0bb
Show file tree
Hide file tree
Showing 3 changed files with 463 additions and 48 deletions.
22 changes: 15 additions & 7 deletions src/DomainRobot.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@

use IXDomainRobot\Service\CertificateService;
use IXDomainRobot\Lib\DomainRobotConfig;
use IXDomainRobot\Model\Certificate;
use IXDomainRobot\Model\DomainEnvelopeSearchRequest;
use IXDomainRobot\Service\DomainStudioService;

class DomainRobot {
class DomainRobot
{

/**
*
Expand All @@ -32,7 +34,7 @@ public function __construct($domainRobotConfig = [])

public function setDomainRobotConfig(DomainRobotConfig $domainRobotConfig)
{
$this->domainRobotConfig = $domainRobotConfig;
$this->domainRobotConfig = $domainRobotConfig;
}

/**
Expand All @@ -41,8 +43,11 @@ public function setDomainRobotConfig(DomainRobotConfig $domainRobotConfig)
* @param $model
* @return void
*/
public function certificate($model)
public function certificate($model = null)
{
if (empty($model)) {
$model = new Certificate();
}
return new CertificateService($model, $this->domainRobotConfig);
}

Expand All @@ -52,15 +57,18 @@ public function certificate($model)
* @param DomainEnvelopeSearchRequest $model
* @return DomainStudioService
*/
public function domainStudio(DomainEnvelopeSearchRequest $model){
public function domainStudio(DomainEnvelopeSearchRequest $model)
{
return new DomainStudioService($model, $this->domainRobotConfig);
}

static public function setLastDomainRobotResult($lastDomainRobotResult){
static public function setLastDomainRobotResult($lastDomainRobotResult)
{
self::$lastDomainRobotResult = $lastDomainRobotResult;
}

static public function getLastDomainRobotResult(){
static public function getLastDomainRobotResult()
{
return self::$lastDomainRobotResult;
}
}
}
Loading

0 comments on commit 7d0b0bb

Please sign in to comment.