namespace pharext;
-use pharext\Cli\Args as CliArgs;
use pharext\Cli\Command as CliCommand;
use Phar;
* Create the command
*/
public function __construct() {
- $this->args = new CliArgs([
+ $this->args = new Cli\Args([
["h", "help", "Display help",
- CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG|CliArgs::HALT],
+ Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG|Cli\Args::HALT],
["v", "verbose", "More output",
- CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG],
+ Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG],
["q", "quiet", "Less output",
- CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG],
+ Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG],
["p", "prefix", "PHP installation prefix if phpize is not in \$PATH, e.g. /opt/php7",
- CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::REQARG],
+ Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::REQARG],
["n", "common-name", "PHP common program name, e.g. php5 or zts-php",
- CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::REQARG,
+ Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::REQARG,
"php"],
["c", "configure", "Additional extension configure flags, e.g. -c --with-flag",
- CliArgs::OPTIONAL|CliArgs::MULTI|CliArgs::REQARG],
+ Cli\Args::OPTIONAL|Cli\Args::MULTI|Cli\Args::REQARG],
["s", "sudo", "Installation might need increased privileges",
- CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::OPTARG,
+ Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::OPTARG,
"sudo -S %s"],
["i", "ini", "Activate in this php.ini instead of loaded default php.ini",
- CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::REQARG],
+ Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::REQARG],
[null, "signature", "Show package signature",
- CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG|CliArgs::HALT],
+ Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG|Cli\Args::HALT],
[null, "license", "Show package license",
- CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG|CliArgs::HALT],
+ Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG|Cli\Args::HALT],
[null, "name", "Show package name",
- CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG|CliArgs::HALT],
+ Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG|Cli\Args::HALT],
[null, "date", "Show package release date",
- CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG|CliArgs::HALT],
+ Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG|Cli\Args::HALT],
[null, "release", "Show package release version",
- CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG|CliArgs::HALT],
+ Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG|Cli\Args::HALT],
[null, "version", "Show pharext version",
- CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG|CliArgs::HALT],
+ Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG|Cli\Args::HALT],
]);
}
namespace pharext;
use Phar;
-use pharext\Cli\Args as CliArgs;
use pharext\Cli\Command as CliCommand;
use pharext\Exception;
* Create the command
*/
public function __construct() {
- $this->args = new CliArgs([
+ $this->args = new Cli\Args([
["h", "help", "Display this help",
- CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG|CliArgs::HALT],
+ Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG|Cli\Args::HALT],
["v", "verbose", "More output",
- CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG],
+ Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG],
["q", "quiet", "Less output",
- CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG],
+ Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG],
["n", "name", "Extension name",
- CliArgs::REQUIRED|CliArgs::SINGLE|CliArgs::REQARG],
+ Cli\Args::REQUIRED|Cli\Args::SINGLE|Cli\Args::REQARG],
["r", "release", "Extension release version",
- CliArgs::REQUIRED|CliArgs::SINGLE|CliArgs::REQARG],
+ Cli\Args::REQUIRED|Cli\Args::SINGLE|Cli\Args::REQARG],
["s", "source", "Extension source directory",
- CliArgs::REQUIRED|CliArgs::SINGLE|CliArgs::REQARG],
+ Cli\Args::REQUIRED|Cli\Args::SINGLE|Cli\Args::REQARG],
["g", "git", "Use `git ls-tree` to determine file list",
- CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG],
+ Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG],
["b", "branch", "Checkout this tag/branch",
- CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::REQARG],
+ Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::REQARG],
["p", "pecl", "Use PECL package.xml to determine file list, name and release",
- CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG],
+ Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG],
["d", "dest", "Destination directory",
- CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::REQARG,
+ Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::REQARG,
"."],
["z", "gzip", "Create additional PHAR compressed with gzip",
- CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG],
+ Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG],
["Z", "bzip", "Create additional PHAR compressed with bzip",
- CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG],
+ Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG],
["S", "sign", "Sign the PHAR with a private key",
- CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::REQARG],
+ Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::REQARG],
["E", "zend", "Mark as Zend Extension",
- CliArgs::OPTIONAL|CliARgs::SINGLE|CliArgs::NOARG],
+ Cli\Args::OPTIONAL|CliARgs::SINGLE|Cli\Args::NOARG],
[null, "signature", "Show pharext signature",
- CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG|CliArgs::HALT],
+ Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG|Cli\Args::HALT],
[null, "license", "Show pharext license",
- CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG|CliArgs::HALT],
+ Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG|Cli\Args::HALT],
[null, "version", "Show pharext version",
- CliArgs::OPTIONAL|CliArgs::SINGLE|CliArgs::NOARG|CliArgs::HALT],
+ Cli\Args::OPTIONAL|Cli\Args::SINGLE|Cli\Args::NOARG|Cli\Args::HALT],
]);
}
}
try {
- /* source needs to be evaluated before CliArgs validation,
- * so e.g. name and version can be overriden and CliArgs
+ /* source needs to be evaluated before Cli\Args validation,
+ * so e.g. name and version can be overriden and Cli\Args
* does not complain about missing arguments
*/
$this->loadSource();