Added the Search API Synonym module to deal specifically with licence and license...
[yaffs-website] / vendor / drush / drush / examples / helloworld.script
1 <?php
2
3 //
4 // This example demonstrates how to write a drush
5 // script.  These scripts are run with the php-script command.
6 //
7 use Drush\Drush;
8
9 $this->output()->writeln("Hello world!");
10 $this->output()->writeln("The extra options/arguments to this command were:");
11 $this->output()->writeln(print_r($extra, true));
12
13
14
15 //
16 // We can check which site was bootstrapped via
17 // the '@self' alias, which is defined only if
18 // there is a bootstrapped site.
19 //
20 $self = Drush::aliasManager()->getSelf();;
21 if (empty($self->root())) {
22   $this->output()->writeln('No bootstrapped site.');
23 }
24 else {
25   $this->output()->writeln('The following site is bootstrapped:');
26   $this->output()->writeln(print_r($self->legacyRecord(), true));
27 }