Vulcan\CurrencyConversion\Tasks\SyncRatesTask
Class SyncRatesTask
Synopsis
class SyncRatesTask
extends BuildTask
implements
CronTask
{
- // members
- protected string $title = 'Sync currency exchange rates';
- protected string $description = 'Get the latest exchange rates from the API provided by currencylayer.com';
- // methods
- public void run()
- public string getSchedule()
- public void process()
- private void execute()
- private float|bool findBaseCurrencyRate()
Hierarchy
Extends
- SilverStripe\Dev\BuildTask
Implements
- SilverStripe\CronTask\Interfaces\CronTask
Members
protected
- $description
- $title
Methods
private
- execute()
- findBaseCurrencyRate() — Finds the base currency in the array of rates
public
- getSchedule() — Return a string for a CRON expression
- process() — When this script is supposed to run the CronTaskController will execute process().
- run() — Implement this method in the task subclass to execute via the TaskRunner