class SjLocalDevClient in Acquia Cloud Site Factory Connector 8
Same name and namespace in other branches
- 8.2 acsf_sj/src/Api/SjLocalDevClient.php \Drupal\acsf_sj\Api\SjLocalDevClient
Provides a Scheduled Jobs API local development client.
Hierarchy
- class \Drupal\acsf_sj\Api\SjApiClient implements SjClientInterface
- class \Drupal\acsf_sj\Api\SjLocalDevClient implements SjClientInterface
Expanded class hierarchy of SjLocalDevClient
File
- acsf_sj/
src/ Api/ SjLocalDevClient.php, line 10
Namespace
Drupal\acsf_sj\ApiView source
class SjLocalDevClient extends SjApiClient implements SjClientInterface {
/**
* {@inheritdoc}
*/
public function addJob($drush_command, $reason = NULL, $timestamp = NULL, $domain = NULL, $timeout = NULL, $drush_executable = NULL, $drush_options = NULL) {
try {
$this
->inputValidation($drush_command, $timestamp, $domain, $timeout, $drush_executable, $drush_options);
} catch (\Exception $e) {
$this->logger
->log(LogLevel::ERROR, 'Local dev: unable to add the scheduled job: @message', [
'@message' => $e
->getMessage(),
]);
return FALSE;
}
$sjadd_arguments = $this
->prepareCommandArguments($drush_command, $reason, $timestamp, $domain, $timeout, $drush_executable, $drush_options);
$this->logger
->log(LogLevel::NOTICE, 'Local dev: sjadd @arguments', [
'@arguments' => $sjadd_arguments,
]);
return TRUE;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SjApiClient:: |
private | property | Scheduled Job's binaries path. | |
SjApiClient:: |
protected | property | Current domain of this site. | |
SjApiClient:: |
protected | property | A logger instance for acsf_sj. | |
SjApiClient:: |
private | function | Executes the sjadd command. | |
SjApiClient:: |
protected | function | Validates/completes the sjadd input. | |
SjApiClient:: |
protected | function | Compiles the argument to the sjadd command. | |
SjApiClient:: |
public | function | Constructs the ACSF SJ Client. | |
SjLocalDevClient:: |
public | function |
Adds a scheduled job. Overrides SjApiClient:: |