PHP Classes

File: vendor/wp-cli/wp-cli/php/dispatcher.php

Recommend this page to a friend!
  Classes of Adeleye Ayodeji   Nolimitbuzz WP Theme   vendor/wp-cli/wp-cli/php/dispatcher.php   Download  
File: vendor/wp-cli/wp-cli/php/dispatcher.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Nolimitbuzz WP Theme
WordPress theme to used as start of new themes
Author: By
Last change:
Date: 19 days ago
Size: 344 bytes
 

Contents

Class file image Download
<?php

namespace WP_CLI\Dispatcher;

/**
 * Get the path to a command, e.g. "core download"
 *
 * @param Subcommand|CompositeCommand $command
 * @return string[]
 */
function get_path( $command ) {
   
$path = [];

    do {
       
array_unshift( $path, $command->get_name() );
       
$command = $command->get_parent();
    } while (
$command );

    return
$path;
}