Automattic\WooCommerce\Blueprint\Steps
RunSql::get_schema
Returns the schema for the JSON representation of this step.
Метод класса: RunSql{}
Хуков нет.
Возвращает
array. The schema array.
Использование
$result = RunSql::get_schema( $version ): array;
- $version(int)
- The version of the schema to return.
По умолчанию:1
Код RunSql::get_schema() RunSql::get schema WC 11.3.0
public static function get_schema( int $version = 1 ): array {
return array(
'type' => 'object',
'properties' => array(
'step' => array(
'type' => 'string',
'enum' => array( static::get_step_name() ),
),
'sql' => array(
'type' => 'object',
'required' => array( 'contents', 'resource', 'name' ),
'properties' => array(
'resource' => array(
'type' => 'string',
'enum' => array( 'literal' ),
),
'name' => array(
'type' => 'string',
),
'contents' => array(
'type' => 'string',
),
),
),
),
'required' => array( 'step', 'sql' ),
);
}