Yoast\WP\Lib\Migrations
Adapter::is_sql_method_call() private Yoast 1.0
Detect whether or not the string represents a function call and if so do not wrap it in single-quotes, otherwise do wrap in single quotes.
{} Это метод класса: Adapter{}
Хуков нет.
Возвращает
true/false
. Whether or not it's a SQL function call.
Использование
// private - только в коде основоного (родительского) класса $result = $this->is_sql_method_call( $string );
- $string(строка) (обязательный)
- The string.
Код Adapter::is_sql_method_call() Adapter::is sql method call Yoast 16.1.1
private function is_sql_method_call( $string ) {
$string = \trim( $string );
if ( \substr( $string, -2, 2 ) === '()' ) {
return true;
}
return false;
}