namespace pharext;
use Phar;
+use pharext\Cli\Args as CliArgs;
+use pharext\Cli\Command as CliCommand;
/**
* The extension install command executed by the extension phar
$phars[$this->tmp] = $phar;
foreach ($phars as $phar) {
- if (($hook = $phar["pharext_install.php"])) {
+ if (isset($phar["pharext_install.php"])) {
$callable = include $phar["pharext_install.php"];
if (is_callable($callable)) {
$recv[] = $callable($this);
}
}
- private function newtemp($prefix) {
- $temp = $this->tempname($prefix);
- if (!is_dir($temp)) {
- if (!mkdir($temp, 0750, true)) {
- $this->error(null);
- exit(3);
- }
- }
- return $temp;
- }
-
/**
* Prepares, configures, builds and installs the extension
*/
}
}
- /**
- * rm -r
- * @param string $dir
- */
- private function rm($dir) {
- foreach (scandir($dir) as $entry) {
- if ($entry === "." || $entry === "..") {
- continue;
- } elseif (is_dir("$dir/$entry")) {
- $this->rm("$dir/$entry");
- } elseif (!unlink("$dir/$entry")) {
- $this->error(null);
- }
- }
- if (!rmdir($dir)) {
- $this->error(null);
- }
- }
-
/**
* Execute a program with escalated privileges handling interactive password prompt
* @param string $command