protected function processDockerfileVariables()
    {
        $variables = [];
        $variables['PHP_VERSION'] = $this->getVersion();

        foreach ($this->configs as $key => $values) {
            if (!in_array($key, static::DOCKER_VARIABLES)) {
                continue;
            }

            if ($key === 'PHP_EXT_ENABLE'
                && !empty($this->configs['PHP_PECL'])) {
                $php_pecl = $this->configs['PHP_PECL'];

                // Remove the version from the PECL package.
                array_walk($php_pecl, function (&$name) {
                    $pos = strpos($name, ':');
                    if ($pos !== false) {
                        $name = substr($name, 0, $pos);
                    }
                });
                $values = array_merge($php_pecl, $values);
            }

            if (empty($values)) {
                continue;
            }

            $variables[$key] = $this->formatVariables($key, $values);
        }

        return $variables;
    }
protected function processDockerfileVariables()
    {
        $variables = [];
        $variables['PHP_VERSION'] = $this->getVersion();

        foreach ($this->configs as $key => $values) {
            if (!in_array($key, static::DOCKER_VARIABLES)) {
                continue;
            }

            if ($key === 'PHP_EXT_ENABLE'
                && !empty($this->configs['PHP_PECL'])) {
                $php_pecl = $this->configs['PHP_PECL'];

                // Remove the version from the PECL package.
                array_walk($php_pecl, function (&$name) {
                    $pos = strpos($name, ':');
                    if ($pos !== false) {
                        $name = substr($name, 0, $pos);
                    }
                });
                $values = array_merge($php_pecl, $values);
            }

            if (empty($values)) {
                continue;
            }

            $variables[$key] = $this->formatVariables($key, $values);
        }

        return $variables;
    }
protected function processDockerfileVariables ( ) { $ variables = [ ] ; $ variables [ 'PHP_VERSION' ] = $ this -> getVersion ( ) ; foreach ( $ this -> configs as $ key => $ values ) { if ( ! in_array ( $ key , static :: DOCKER_VARIABLES ) ) { continue ; } if ( $ key === 'PHP_EXT_ENABLE' && ! empty ( $ this -> configs [ 'PHP_PECL' ] ) ) { $ php_pecl = $ this -> configs [ 'PHP_PECL' ] ; // Remove the version from the PECL package. array_walk ( $ php_pecl , function ( & $ name ) { $ pos = strpos ( $ name , ':' ) ; if ( $ pos !== false ) { $ name = substr ( $ name , 0 , $ pos ) ; } } ) ; $ values = array_merge ( $ php_pecl , $ values ) ; } if ( empty ( $ values ) ) { continue ; } $ variables [ $ key ] = $ this -> formatVariables ( $ key , $ values ) ; } return $ variables ; }
Process dockerfile variables.
Process dockerfile variables .