WP_CLI\Fetchers
Base::get_check()
Like get(), but calls WP_CLI::error() instead of returning false.
Method of the class: Base{}
No Hooks.
Return
Mixed
. The item if found.
Usage
$Base = new Base(); $Base->get_check( $arg );
- $arg(string) (required)
- The raw CLI argument.
Base::get_check() Base::get check code 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; }