abstract class AcsfEventHandler in Acquia Cloud Site Factory Connector 8.2
Same name and namespace in other branches
- 8 src/Event/AcsfEventHandler.php \Drupal\acsf\Event\AcsfEventHandler
AcsfEventHandler.
The purpose of this class is to define an interface for events within Site Factory. Customers who have access to customize their code base can write client code to this interface to interact with events in a standardized way.
Hierarchy
- class \Drupal\acsf\Event\AcsfEventHandler
Expanded class hierarchy of AcsfEventHandler
4 files declare their use of AcsfEventHandler
File
- src/
Event/ AcsfEventHandler.php, line 12
Namespace
Drupal\acsf\EventView source
abstract class AcsfEventHandler {
/**
* The time that the handler was started.
*
* @var int
*/
public $started = 0;
/**
* The time that the handler was completed.
*
* @var int
*/
public $completed = 0;
/**
* Any messages triggered by the handler.
*
* @var string
*/
public $message = '';
/**
* Constructor.
*
* @param AcsfEvent $event
* The event that has been initiated.
*/
public function __construct(AcsfEvent $event) {
$this->event = $event;
}
/**
* Writes a log message to the console.
*
* @param string $message
* The log message to be written.
*/
public function consoleLog($message) {
if (isset($this->event->output)) {
$this->event->output
->writeln($message);
}
}
/**
* Handle the event.
*/
public abstract function handle();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AcsfEventHandler:: |
public | property | The time that the handler was completed. | |
AcsfEventHandler:: |
public | property | Any messages triggered by the handler. | |
AcsfEventHandler:: |
public | property | The time that the handler was started. | |
AcsfEventHandler:: |
public | function | Writes a log message to the console. | |
AcsfEventHandler:: |
abstract public | function | Handle the event. | 12 |
AcsfEventHandler:: |
public | function | Constructor. | 1 |