ServerCommand
class ServerCommand extends Command (View source)
| internal | This command makes no guarantee of an API for Drupal extensions. |
Runs the PHP webserver for a Drupal site for local testing/development.
Properties
| protected object | $classLoader | The class loader. |
Methods
Constructs a new ServerCommand command.
{@inheritdoc}
{@inheritdoc}
Boots up a Drupal environment.
Finds an available port.
Opens a URL in your system default browser.
Gets a one time login URL for user 1.
Starts up a webserver with a running Drupal.
Gets the site path.
Details
__construct(object $class_loader)
Constructs a new ServerCommand command.
protected
configure()
{@inheritdoc}
protected int
execute(InputInterface $input, OutputInterface $output)
{@inheritdoc}
protected DrupalKernelInterface
boot()
Boots up a Drupal environment.
protected int|false
findAvailablePort(string $host)
Finds an available port.
protected
openBrowser(string $url, SymfonyStyle $io)
Opens a URL in your system default browser.
protected string
getOneTimeLoginUrl()
Gets a one time login URL for user 1.
protected int
start(string $host, int $port, DrupalKernelInterface $kernel, InputInterface $input, SymfonyStyle $io)
Starts up a webserver with a running Drupal.
protected string
getSitePath()
Gets the site path.
Defaults to 'sites/default'. For testing purposes this can be overridden using the DRUPAL_DEV_SITE_PATH environment variable.