-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
2 changed files
with
67 additions
and
0 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,23 @@ | ||
{ | ||
"name": "Cli Application", | ||
"created": "29 January 2018", | ||
"version": "1.0.0", | ||
"description": "Cli application example", | ||
"copyright": "Copyright (c) 2018 - Steeve Andrian Salim", | ||
"authors": [ | ||
{ | ||
"name": "Steeve Andrian Salim", | ||
"email": "steevenz@ymail.com", | ||
"homepage": "http://o2system.id", | ||
"role": "Founder" | ||
} | ||
], | ||
"support": { | ||
"email": "support@o2system.id", | ||
"issues": "https://o2system.id/support" | ||
}, | ||
"links": { | ||
"info": "http://www.o2system.id/about", | ||
"wiki": "http://www.o2system.id/wiki" | ||
} | ||
} |
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,44 @@ | ||
<?php | ||
/** | ||
* This file is part of the O2System PHP Framework package. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* @author Steeve Andrian Salim | ||
* @copyright Copyright (c) Steeve Andrian Salim | ||
*/ | ||
// ------------------------------------------------------------------------ | ||
|
||
require_once '../cli.php'; | ||
|
||
/* | ||
* ------------------------------------------------------ | ||
* CREATE APP | ||
* ------------------------------------------------------ | ||
*/ | ||
|
||
// Commander | ||
// php o2system commander/method --option -- | ||
|
||
$welcomeNote = <<<WELCOME_NOTE | ||
( ( | ||
)\ )\ ( | ||
(((_) ( ( ( ( ((_) ))\ | ||
)\___ )\ )\ ) )\ )\ _ /((_) | ||
((/ __| ((_) _(_/( ((_) ((_)| |(_)) | ||
| (__ / _ \| ' \))(_-</ _ \| |/ -_) | ||
\___|\___/|_||_| /__/\___/|_|\___| | ||
WELCOME_NOTE; | ||
|
||
$cliApp = new O2System\Framework\Cli\App(); | ||
$cliApp | ||
->setWelcomeNote( ( new \O2System\Kernel\Cli\Writers\Text ) | ||
->setContextualClass( \O2System\Kernel\Cli\Writers\Text::DANGER ) | ||
->setString( $welcomeNote ) | ||
) | ||
->setName( 'Cli Application' ) | ||
->setVersion( '1.0.0' ) | ||
->setCommandersNamespace( '\App\Commanders' ) | ||
->setCommandersPath( PATH_APP . 'Commanders' ) | ||
->run(); |