From eab28a81ef37cd1e29c737d51a7f28d663738820 Mon Sep 17 00:00:00 2001 From: inhere Date: Sat, 13 Jan 2018 17:52:01 +0800 Subject: [PATCH] remove Style to Components dir --- README.md | 2 +- examples/Controllers/HomeController.php | 4 ++-- examples/commands.php | 4 ++-- src/Base/AbstractApplication.php | 4 ++-- src/{ => Components}/Style/Color.php | 4 ++-- src/{ => Components}/Style/Highlighter.php | 4 ++-- src/{ => Components}/Style/LiteStyle.php | 2 +- src/{ => Components}/Style/Style.php | 4 ++-- src/IO/Output.php | 2 +- src/LiteApp.php | 2 +- src/Traits/FormatOutputAwareTrait.php | 2 +- src/Utils/Show.php | 2 +- 12 files changed, 18 insertions(+), 18 deletions(-) rename src/{ => Components}/Style/Color.php (98%) rename src/{ => Components}/Style/Highlighter.php (99%) rename src/{ => Components}/Style/LiteStyle.php (99%) rename src/{ => Components}/Style/Style.php (99%) diff --git a/README.md b/README.md index b5c899c..365f5de 100644 --- a/README.md +++ b/README.md @@ -396,7 +396,7 @@ $output->write('hello world'); - **单独使用颜色风格** ```php -$style = Inhere\Console\Style\Style::create(); +$style = Inhere\Console\Components\Style\Style::create(); echo $style->render('no color color text'); diff --git a/examples/Controllers/HomeController.php b/examples/Controllers/HomeController.php index 128c566..3c37614 100644 --- a/examples/Controllers/HomeController.php +++ b/examples/Controllers/HomeController.php @@ -7,8 +7,8 @@ use Inhere\Console\Components\Download; use Inhere\Console\Controller; use Inhere\Console\IO\Input; -use Inhere\Console\Style\Highlighter; -use Inhere\Console\Style\LiteStyle; +use Inhere\Console\Components\Style\Highlighter; +use Inhere\Console\Components\Style\LiteStyle; use Inhere\Console\Utils\Helper; use Inhere\Console\Utils\Interact; use Inhere\Console\Utils\ProgressBar; diff --git a/examples/commands.php b/examples/commands.php index 56bc6ed..1f2e3e1 100644 --- a/examples/commands.php +++ b/examples/commands.php @@ -7,7 +7,7 @@ * @var Inhere\Console\Application $app */ -use Inhere\Console\BuiltIn\PharController; +// use Inhere\Console\BuiltIn\PharController; use Inhere\Console\Examples\Commands\DemoCommand; use Inhere\Console\Examples\Commands\TestCommand; use Inhere\Console\Examples\Controllers\HomeController; @@ -26,7 +26,7 @@ 'aliases' => ['t'] ]); -$app->controller(PharController::class); +// $app->controller(PharController::class); $app->controller('home', HomeController::class, [ 'aliases' => ['h'] diff --git a/src/Base/AbstractApplication.php b/src/Base/AbstractApplication.php index 886bb1b..adaa3c8 100644 --- a/src/Base/AbstractApplication.php +++ b/src/Base/AbstractApplication.php @@ -10,10 +10,10 @@ use Inhere\Console\IO\Input; use Inhere\Console\IO\Output; -use Inhere\Console\Style\Highlighter; +use Inhere\Console\Components\Style\Highlighter; use Inhere\Console\Traits\InputOutputAwareTrait; use Inhere\Console\Traits\SimpleEventTrait; -use Inhere\Console\Style\Style; +use Inhere\Console\Components\Style\Style; use Inhere\Console\Utils\FormatUtil; use Inhere\Console\Utils\Helper; diff --git a/src/Style/Color.php b/src/Components/Style/Color.php similarity index 98% rename from src/Style/Color.php rename to src/Components/Style/Color.php index 7f3394a..ecd0e6f 100644 --- a/src/Style/Color.php +++ b/src/Components/Style/Color.php @@ -3,13 +3,13 @@ * Created by PhpStorm. */ -namespace Inhere\Console\Style; +namespace Inhere\Console\Components\Style; /** * Class Color * - fg unset 39 * - bg unset 49 - * @package Inhere\Console\Style + * @package Inhere\Console\Components\Style */ final class Color { diff --git a/src/Style/Highlighter.php b/src/Components/Style/Highlighter.php similarity index 99% rename from src/Style/Highlighter.php rename to src/Components/Style/Highlighter.php index 8107156..54cb4e4 100644 --- a/src/Style/Highlighter.php +++ b/src/Components/Style/Highlighter.php @@ -6,11 +6,11 @@ * Time: 15:50 */ -namespace Inhere\Console\Style; +namespace Inhere\Console\Components\Style; /** * Class Highlighter - * @package Inhere\Console\Style + * @package Inhere\Console\Components\Style * * @see jakub-onderka/php-console-highlighter * @link https://github.com/JakubOnderka/PHP-Console-Highlighter/blob/master/src/Highlighter.php diff --git a/src/Style/LiteStyle.php b/src/Components/Style/LiteStyle.php similarity index 99% rename from src/Style/LiteStyle.php rename to src/Components/Style/LiteStyle.php index a335a1e..125b56f 100644 --- a/src/Style/LiteStyle.php +++ b/src/Components/Style/LiteStyle.php @@ -6,7 +6,7 @@ * Time: 下午7:45 */ -namespace Inhere\Console\Style; +namespace Inhere\Console\Components\Style; use Inhere\Console\Utils\Helper; diff --git a/src/Style/Style.php b/src/Components/Style/Style.php similarity index 99% rename from src/Style/Style.php rename to src/Components/Style/Style.php index 4dbaa78..170c92e 100644 --- a/src/Style/Style.php +++ b/src/Components/Style/Style.php @@ -8,13 +8,13 @@ * file: Color.php */ -namespace Inhere\Console\Style; +namespace Inhere\Console\Components\Style; use Inhere\Console\Utils\Helper; /** * Class Style - * @package Inhere\Console\Style + * @package Inhere\Console\Components\Style * @link https://github.com/ventoviro/windwalker-IO * * @method string info(string $message) diff --git a/src/IO/Output.php b/src/IO/Output.php index 151fd8d..6535362 100644 --- a/src/IO/Output.php +++ b/src/IO/Output.php @@ -8,7 +8,7 @@ namespace Inhere\Console\IO; -use Inhere\Console\Style\Style; +use Inhere\Console\Components\Style\Style; use Inhere\Console\Traits\FormatOutputAwareTrait; use Inhere\Console\Utils\Helper; use Inhere\Console\Utils\Show; diff --git a/src/LiteApp.php b/src/LiteApp.php index 93382a8..727a067 100644 --- a/src/LiteApp.php +++ b/src/LiteApp.php @@ -8,7 +8,7 @@ namespace Inhere\Console; -use Inhere\Console\Style\LiteStyle; +use Inhere\Console\Components\Style\LiteStyle; /** * Class LiteApp - Lite Application diff --git a/src/Traits/FormatOutputAwareTrait.php b/src/Traits/FormatOutputAwareTrait.php index 5fb4afb..96f6568 100644 --- a/src/Traits/FormatOutputAwareTrait.php +++ b/src/Traits/FormatOutputAwareTrait.php @@ -8,7 +8,7 @@ namespace Inhere\Console\Traits; -use Inhere\Console\Style\Style; +use Inhere\Console\Components\Style\Style; use Inhere\Console\Utils\Helper; use Inhere\Console\Utils\Show; diff --git a/src/Utils/Show.php b/src/Utils/Show.php index bde223e..c698e65 100644 --- a/src/Utils/Show.php +++ b/src/Utils/Show.php @@ -9,7 +9,7 @@ namespace Inhere\Console\Utils; use Inhere\Console\Components\StrBuffer; -use Inhere\Console\Style\Style; +use Inhere\Console\Components\Style\Style; /** * Class Show