pharext\Task\Phpize::run PHP Method

run() public method

public run ( boolean $verbose = false )
$verbose boolean
    public function run($verbose = false)
    {
        if ($verbose !== false) {
            printf("Running %s ...\n", $this->phpize);
        }
        $pwd = getcwd();
        if (!chdir($this->cwd)) {
            throw new Exception();
        }
        try {
            $cmd = new ExecCmd($this->phpize, $verbose);
            $cmd->run();
        } finally {
            chdir($pwd);
        }
    }

Usage Example

Beispiel #1
0
 /**
  * Phpize + trinity
  */
 private function install($temp)
 {
     // phpize
     $phpize = new Task\Phpize($temp, $this->args->prefix, $this->args->{"common-name"});
     $phpize->run($this->verbosity());
     // configure
     $configure = new Task\Configure($temp, $this->args->configure, $this->args->prefix, $this->args->{"common-name"});
     $configure->run($this->verbosity());
     // make
     $make = new Task\Make($temp);
     $make->run($this->verbosity());
     // install
     $sudo = isset($this->args->sudo) ? $this->args->sudo : null;
     $install = new Task\Make($temp, ["install"], $sudo);
     $install->run($this->verbosity());
 }