-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7179a79
commit 8364648
Showing
9 changed files
with
76 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"index_root": "public/index.php", | ||
"app_root": "src/Acme/Demo/", | ||
"root_paths": ["."] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
if (!file_exists("vendor/bin/runway")) { | ||
echo("Runway not installed. Please run 'composer install' first.\n"); | ||
exit(1); | ||
} | ||
|
||
require_once("vendor/bin/runway"); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
namespace flight\commands; | ||
|
||
class ExampleCommand extends AbstractBaseCommand | ||
{ | ||
/** | ||
* Construct | ||
* | ||
* @param array<string,mixed> $config JSON config from .runway-config.json | ||
*/ | ||
public function __construct(array $config) | ||
{ | ||
parent::__construct('example:example-command', 'This is a sample command.', $config); | ||
} | ||
|
||
/** | ||
* Executes the function | ||
* | ||
* @return void | ||
*/ | ||
public function execute() | ||
{ | ||
$io = $this->app()->io(); | ||
|
||
$io->info('This is an example... '); | ||
|
||
$io->info('remember to pass `true` in the $io functions to add a new line at the end of the message.', true); | ||
|
||
// ... do something here ... | ||
|
||
$io->ok('Example completed!', true); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
src/Acme/Demo/Controller/API.php → src/Acme/Demo/Controllers/API.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace Acme\Demo\Controller; | ||
namespace Acme\Demo\Controllers; | ||
|
||
use Flight; | ||
use Flight\template\View; | ||
|
2 changes: 1 addition & 1 deletion
2
src/Acme/Demo/Controller/Demo.php → src/Acme/Demo/Controllers/Demo.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace Acme\Demo\Controller; | ||
namespace Acme\Demo\Controllers; | ||
|
||
use Flight; | ||
|
||
|