WP_CLI\Dispatcher
Subcommand::get_parameters()
Get an array of parameter names, by merging the command-specific and the global parameters.
Метод класса: Subcommand{}
Хуков нет.
Возвращает
Массив
. Array of parameter names
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_parameters( $spec );
- $spec(массив)
- Specification of the current command.
По умолчанию: []
Код Subcommand::get_parameters() Subcommand::get parameters WP-CLI 2.8.0-alpha
private function get_parameters( $spec = [] ) { $local_parameters = array_column( $spec, 'name' ); $global_parameters = array_column( SynopsisParser::parse( $this->get_global_params() ), 'name' ); return array_unique( array_merge( $local_parameters, $global_parameters ) ); }