diff options
Diffstat (limited to 'source/Application/Cli.php')
-rw-r--r-- | source/Application/Cli.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/source/Application/Cli.php b/source/Application/Cli.php new file mode 100644 index 0000000..7c4ec19 --- /dev/null +++ b/source/Application/Cli.php @@ -0,0 +1,30 @@ +<?php +/** + * @author stev leibelt <artodeto@bazzline.net> + * @since 2014-08-17 + */ + +/** + * Class Application_Cli + */ +class Application_Cli extends AbstractApplication +{ + /** + * @throws Exception + */ + public function __construct() + { + global $argv; + + $isNotCalledFromCommandLineInterface = (PHP_SAPI !== 'cli'); + + if ($isNotCalledFromCommandLineInterface) { + throw new Exception( + 'command line script only ' + ); + } + $arguments = $argv; + array_shift($arguments); + $this->setArguments($arguments); + } +}
\ No newline at end of file |