You are here

public function SqlBase::__toString in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/migrate/src/Plugin/migrate/source/SqlBase.php \Drupal\migrate\Plugin\migrate\source\SqlBase::__toString()
  2. 9 core/modules/migrate/src/Plugin/migrate/source/SqlBase.php \Drupal\migrate\Plugin\migrate\source\SqlBase::__toString()

Prints the query string when the object is used as a string.

Return value

string The query string.

Overrides MigrateSourceInterface::__toString

File

core/modules/migrate/src/Plugin/migrate/source/SqlBase.php, line 134

Class

SqlBase
Sources whose data may be fetched via a database connection.

Namespace

Drupal\migrate\Plugin\migrate\source

Code

public function __toString() {
  return (string) $this
    ->query();
}