blob: 7c4ec1947c567b1a6f9c3e140eb23c9507e65fd4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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);
}
}
|