class RemoteCalls in Anti Spam by CleanTalk 8.4
Same name in this branch
- 8.4 src/lib/Cleantalk/Common/RemoteCalls.php \Cleantalk\Common\RemoteCalls
- 8.4 src/lib/Cleantalk/ApbctDrupal/RemoteCalls.php \Cleantalk\ApbctDrupal\RemoteCalls
Same name and namespace in other branches
- 9.1.x src/lib/Cleantalk/ApbctDrupal/RemoteCalls.php \Cleantalk\ApbctDrupal\RemoteCalls
Hierarchy
- class \Cleantalk\Common\RemoteCalls
- class \Cleantalk\ApbctDrupal\RemoteCalls
Expanded class hierarchy of RemoteCalls
2 files declare their use of RemoteCalls
- BootSubscriber.php in src/
EventSubscriber/ BootSubscriber.php - CleantalkFuncs.php in src/
CleantalkFuncs.php
File
- src/
lib/ Cleantalk/ ApbctDrupal/ RemoteCalls.php, line 5
Namespace
Cleantalk\ApbctDrupalView source
class RemoteCalls extends \Cleantalk\Common\RemoteCalls {
/**
* SFW update
*
* @return string
*/
public function action__sfw_update() {
return \Drupal\cleantalk\CleantalkFuncs::apbct_sfw_update($this->api_key);
}
/**
* SFW send logs
*
* @return string
*/
public function action__sfw_send_logs() {
return \Drupal\cleantalk\CleantalkFuncs::apbct_sfw_send_logs($this->api_key);
}
public function action__sfw_update__write_base() {
return \Drupal\cleantalk\CleantalkFuncs::apbct_sfw_update($this->api_key);
}
/**
* Get available remote calls from the storage.
*
* @return array
*/
protected function getAvailableRcActions() {
$remote_calls = \Drupal::state()
->get('cleantalk_remote_calls');
if ($remote_calls && !empty($remote_calls)) {
return empty(array_diff_key($remote_calls, $this->default_rc)) ? $remote_calls : $this->default_rc;
}
return $this->default_rc;
}
/**
* Set last call timestamp and save it to the storage.
*
* @param string $action
*
* @return void
*/
protected function setLastCall($action) {
// TODO: Implement setLastCall() method.
$remote_calls = $this
->getAvailableRcActions();
$remote_calls[$action]['last_call'] = time();
\Drupal::state()
->set('cleantalk_remote_calls', $remote_calls);
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RemoteCalls:: |
protected | property | ||
RemoteCalls:: |
private | property | ||
RemoteCalls:: |
protected | property | ||
RemoteCalls:: |
private | property | ||
RemoteCalls:: |
public | function | SFW send logs | |
RemoteCalls:: |
public | function | SFW update | |
RemoteCalls:: |
public | function | ||
RemoteCalls:: |
public static | function | * Checking if the current request is the Remote Call * * | |
RemoteCalls:: |
constant | |||
RemoteCalls:: |
protected | function |
Get available remote calls from the storage. Overrides RemoteCalls:: |
|
RemoteCalls:: |
public | function | Execute corresponding method of RemoteCalls if exists | |
RemoteCalls:: |
protected | function |
Set last call timestamp and save it to the storage. Overrides RemoteCalls:: |
|
RemoteCalls:: |
public | function |