class BrowseCommands extends DrushCommands implements SiteAliasManagerAwareInterface (View source)

Traits

SiteAliasManagerAwareTrait
ProcessManagerAwareTrait
LoggerAwareTrait
IO
ConfigAwareTrait

Constants

REQ

OPT

EXIT_SUCCESS

EXIT_FAILURE

EXIT_FAILURE_WITH_CLARITY

Properties

protected CommandData $commandData from  DrushCommands

Methods

getConfig()

Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.

__construct()

No description

io()

Override Robo's IO function with our custom style.

LoggerInterface
logger()

Returns a logger object.

printFile(string $file)

Print the contents of a file.

preHook(CommandData $commandData)

Persist commandData for use in primary command callback. Used by 'topic' commands.

printFileTopic(CommandData $commandData)

Print the contents of a file. The path comes from the @topic annotation.

HandlerStack
getStack()

Get a Guzzle handler stack that uses the Drush logger.

bool
startBrowser($uri = null, int $sleep = 0, bool $port = false, bool $browser = true)

Starts a background browser/tab for the current site or a specified URL.

static 
programExists($program)

No description

static 
getEditor()

No description

browse(string|null $path = '', array $options = ['browser' => self::REQ, 'redirect-port' => self::REQ])

Display a link to a given path or open link in a browser.

Details

DrushConfig getConfig()

Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.

__construct()

protected io()

Override Robo's IO function with our custom style.

protected LoggerInterface logger()

Returns a logger object.

Return Value

LoggerInterface

protected printFile(string $file)

Print the contents of a file.

Parameters

string $file Full path to a file.

preHook(CommandData $commandData)

Persist commandData for use in primary command callback. Used by 'topic' commands.

Parameters

CommandData $commandData

protected printFileTopic(CommandData $commandData)

Print the contents of a file. The path comes from the @topic annotation.

Parameters

CommandData $commandData Full path to a file.

protected HandlerStack getStack()

Get a Guzzle handler stack that uses the Drush logger.

bool startBrowser($uri = null, int $sleep = 0, bool $port = false, bool $browser = true)

Starts a background browser/tab for the current site or a specified URL.

Uses a non-blocking Process call, so Drush execution will continue.

Parameters

$uri URI or site path to open in browser. If omitted, or if a site path is specified, the current site home page uri will be prepended if the site's hostname resolves.
int $sleep
bool $port
bool $browser

Return Value

bool TRUE if browser was opened. FALSE if browser was disabled by the user or a default browser could not be found.

static programExists($program)

Parameters

$program

static getEditor()

browse(string|null $path = '', array $options = ['browser' => self::REQ, 'redirect-port' => self::REQ])

Display a link to a given path or open link in a browser.

Parameters

string|null $path Path to open. If omitted, the site front page will be opened.
array $options An associative array of options whose values come from cli, aliases, config, etc.