WP_CLI

DocParser::get_synopsis()publicWP-CLI 1.0

Get the command's synopsis.

Method of the class: DocParser{}

No Hooks.

Return

String.

Usage

$DocParser = new DocParser();
$DocParser->get_synopsis();

DocParser::get_synopsis() code WP-CLI 2.8.0-alpha

public function get_synopsis() {
	if ( ! preg_match( '|^@synopsis\s+(.+)|m', $this->doc_comment, $matches ) ) {
		return '';
	}

	return $matches[1];
}