Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
BuddyPress::command_to_array( object $command )
Adds description and subcomands to the DOC.
Parameters Parameters
- $command
-
(object) (Required) Command.
Return Return
(array)
Source Source
File: cli/src/buddypress.php
private function command_to_array( $command ) { $dump = array( 'name' => $command->get_name(), 'description' => $command->get_shortdesc(), 'longdesc' => $command->get_longdesc(), ); foreach ( $command->get_subcommands() as $subcommand ) { $dump['subcommands'][] = $this->command_to_array( $subcommand ); } if ( empty( $dump['subcommands'] ) ) { $dump['synopsis'] = (string) $command->get_synopsis(); } return $dump; }
Expand full source code Collapse full source code View on Trac