Pickle\Package\PHP\Command\Build\Windows::getInfoFromConfigureLog PHP Метод

getInfoFromConfigureLog() защищенный Метод

protected getInfoFromConfigureLog ( )
    protected function getInfoFromConfigureLog()
    {
        $info = array('thread_safe' => null, 'compiler' => null, 'arch' => null, 'version' => null, 'name' => null);
        $tmp = $this->getLog('configure');
        if (!preg_match(",Build type\\s+\\|\\s+([a-zA-Z]+),", $tmp, $m)) {
            throw new \Exception("Couldn't determine the build thread safety");
        }
        $is_release = 'Release' == $m[1];
        if (!preg_match(",Thread Safety\\s+\\|\\s+([a-zA-Z]+),", $tmp, $m)) {
            throw new \Exception("Couldn't determine the build thread safety");
        }
        $info['thread_safe'] = strtolower($m[1]) == 'yes';
        if (!preg_match(",Compiler\\s+\\|\\s+MSVC(\\d+),", $tmp, $m)) {
            throw new \Exception('Currently only MSVC is supported');
        }
        $info['compiler'] = 'vc' . $m[1];
        if (!preg_match(",Architecture\\s+\\|\\s+([a-zA-Z0-9]+),", $tmp, $m)) {
            throw new \Exception("Couldn't determine the build architecture");
        }
        $info['arch'] = $m[1];
        $info['version'] = $this->getPackage()->getPrettyVersion();
        $info['name'] = $this->getPackage()->getName();
        return $info;
    }