|
4 | 4 |
|
5 | 5 | namespace EE\Site\Type; |
6 | 6 |
|
7 | | -use \Symfony\Component\Filesystem\Filesystem; |
8 | | -use \EE\Model\Site; |
9 | | -use function \EE\Site\Utils\auto_site_name; |
10 | | -use function \EE\Site\Utils\get_site_info; |
| 7 | +use EE\Model\Site; |
| 8 | +use Symfony\Component\Filesystem\Filesystem; |
| 9 | +use function EE\Site\Utils\auto_site_name; |
| 10 | +use function EE\Site\Utils\get_site_info; |
11 | 11 |
|
12 | 12 | /** |
13 | 13 | * Creates a simple PHP Website. |
@@ -121,6 +121,24 @@ public function __construct() { |
121 | 121 | * |
122 | 122 | * [--force] |
123 | 123 | * : Resets the remote database if it is not empty. |
| 124 | + * |
| 125 | + * ## EXAMPLES |
| 126 | + * |
| 127 | + * # Create php site (without db) |
| 128 | + * $ ee site create example.com --type=php |
| 129 | + * |
| 130 | + * # Create php site with db |
| 131 | + * $ ee site create example.com --type=php --with-db |
| 132 | + * |
| 133 | + * # Create php site with ssl from letsencrypt |
| 134 | + * $ ee site create example.com --type=php --ssl=le |
| 135 | + * |
| 136 | + * # Create php site with wildcard ssl |
| 137 | + * $ ee site create example.com --type=php --ssl=le --wildcard |
| 138 | + * |
| 139 | + * # Create php site with remote database |
| 140 | + * $ ee site create example.com --type=php --with-db --dbhost=localhost --dbuser=username --dbpass=password |
| 141 | + * |
124 | 142 | */ |
125 | 143 | public function create( $args, $assoc_args ) { |
126 | 144 |
|
@@ -190,6 +208,12 @@ private function create_site_db_user( string $site_url ): string { |
190 | 208 | * |
191 | 209 | * [<site-name>] |
192 | 210 | * : Name of the website whose info is required. |
| 211 | + * |
| 212 | + * ## EXAMPLES |
| 213 | + * |
| 214 | + * # Display site info |
| 215 | + * $ ee site info example.com |
| 216 | + * |
193 | 217 | */ |
194 | 218 | public function info( $args, $assoc_args ) { |
195 | 219 |
|
@@ -456,6 +480,15 @@ private function create_site_db_entry() { |
456 | 480 | * |
457 | 481 | * [--db] |
458 | 482 | * : Restart db container of site. |
| 483 | + * |
| 484 | + * ## EXAMPLES |
| 485 | + * |
| 486 | + * # Restart all containers of site |
| 487 | + * $ ee site restart example.com |
| 488 | + * |
| 489 | + * # Restart single container of site |
| 490 | + * $ ee site restart example.com --nginx |
| 491 | + * |
459 | 492 | */ |
460 | 493 | public function restart( $args, $assoc_args, $whitelisted_containers = [] ) { |
461 | 494 |
|
@@ -485,6 +518,15 @@ public function restart( $args, $assoc_args, $whitelisted_containers = [] ) { |
485 | 518 | * |
486 | 519 | * [--php] |
487 | 520 | * : Reload php container of site. |
| 521 | + * |
| 522 | + * ## EXAMPLES |
| 523 | + * |
| 524 | + * # Reload all containers of site |
| 525 | + * $ ee site reload example.com |
| 526 | + * |
| 527 | + * # Reload single containers of site |
| 528 | + * $ ee site reload example.com --nginx |
| 529 | + * |
488 | 530 | */ |
489 | 531 | public function reload( $args, $assoc_args, $whitelisted_containers = [], $reload_commands = [] ) { |
490 | 532 | $whitelisted_containers = [ 'nginx', 'php' ]; |
|
0 commit comments