WP_CLI\Fetchers
Base::get_check()
Like get(), but calls WP_CLI::error() instead of returning false.
Метод класса: Base{}
Хуков нет.
Возвращает
Разное
. The item if found.
Использование
$Base = new Base(); $Base->get_check( $arg );
- $arg(строка) (обязательный)
- The raw CLI argument.
Код Base::get_check() Base::get check WP-CLI 2.8.0-alpha
public function get_check( $arg ) { $item = $this->get( $arg ); if ( ! $item ) { WP_CLI::error( sprintf( $this->msg, $arg ) ); } return $item; }