Elgg\Database::executeDelayedQueries PHP Method

executeDelayedQueries() public method

Trigger all queries that were registered as "delayed" queries. This is called by the system automatically on shutdown.
public executeDelayedQueries ( ) : void
return void
    public function executeDelayedQueries()
    {
        foreach ($this->delayed_queries as $set) {
            $query = $set[self::DELAYED_QUERY];
            $type = $set[self::DELAYED_TYPE];
            $handler = $set[self::DELAYED_HANDLER];
            $params = $set[self::DELAYED_PARAMS];
            try {
                $stmt = $this->executeQuery($query, $this->getConnection($type), $params);
                if (is_callable($handler)) {
                    call_user_func($handler, $stmt);
                }
            } catch (\Exception $e) {
                if ($this->logger) {
                    // Suppress all exceptions since page already sent to requestor
                    $this->logger->error($e);
                }
            }
        }
    }