function StatementBase::dispatchStatementExecutionStartEvent
Dispatches an event informing that the statement execution begins.
Parameters
array $args: An array of values with as many elements as there are bound parameters in the SQL statement being executed. This can be empty.
Return value
\Drupal\Core\Database\Event\StatementExecutionStartEvent|null The dispatched event or NULL if event dispatching is not enabled.
2 calls to StatementBase::dispatchStatementExecutionStartEvent()
- StatementPrefetchIterator::execute in core/
lib/ Drupal/ Core/ Database/ StatementPrefetchIterator.php - Executes a prepared statement.
- StatementWrapperIterator::execute in core/
lib/ Drupal/ Core/ Database/ StatementWrapperIterator.php - Executes a prepared statement.
File
-
core/
lib/ Drupal/ Core/ Database/ Statement/ StatementBase.php, line 110
Class
- StatementBase
- StatementInterface base implementation.
Namespace
Drupal\Core\Database\StatementCode
protected function dispatchStatementExecutionStartEvent(array $args) : ?StatementExecutionStartEvent {
if ($this->connection
->isEventEnabled(StatementExecutionStartEvent::class)) {
$startEvent = new StatementExecutionStartEvent(spl_object_id($this), $this->connection
->getKey(), $this->connection
->getTarget(), $this->getQueryString(), $args, $this->connection
->findCallerFromDebugBacktrace());
$this->connection
->dispatchEvent($startEvent);
return $startEvent;
}
return NULL;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.