PhpBrew\Build::__construct PHP Méthode

__construct() public méthode

A build object contains the information of all build options, prefix, paths... etc
public __construct ( string $version, string $name = null, string $installPrefix = null )
$version string build version
$name string build name
$installPrefix string install prefix
    public function __construct($version, $name = null, $installPrefix = null)
    {
        $this->version = $version;
        $this->name = $name ? $name : Utils::canonicalizeBuildName($version);
        if ($installPrefix) {
            $this->setInstallPrefix($installPrefix);
        } else {
            // TODO: find the install prefix automatically
        }
        $this->setBuildSettings(new BuildSettings());
        $this->osName = php_uname('s');
        $this->osRelease = php_uname('r');
    }

Usage Example

 public function __construct()
 {
     parent::__construct('5.3.29');
     $this->setSourceDirectory(Config::getTempFileDir() . '/' . uniqid());
 }