WP_CLI\Fetchers
Base::get_many()
Get multiple items.
Method of the class: Base{}
No Hooks.
Return
Array
. The list of found items.
Usage
$Base = new Base(); $Base->get_many( $args );
- $args(array) (required)
- The raw CLI arguments.
Base::get_many() Base::get many code WP-CLI 2.8.0-alpha
public function get_many( $args ) { $items = []; foreach ( $args as $arg ) { $item = $this->get( $arg ); if ( $item ) { $items[] = $item; } else { WP_CLI::warning( sprintf( $this->msg, $arg ) ); } } return $items; }