protected function convert($extra)
    {
        if (isset($extra['custom-installer'])) {
            foreach ($extra['custom-installer'] as $pattern => $specs) {
                foreach ($specs as $spec) {
                    $match = array();
                    // Type matching
                    if (preg_match('/^type:(.*)$/', $spec, $match)) {
                        $this->types[$match[1]] = $pattern;
                    } // Else it must be the package name.
                    else {
                        $this->packages[$spec] = $pattern;
                    }
                }
            }
        }
    }
protected function convert($extra)
    {
        if (isset($extra['custom-installer'])) {
            foreach ($extra['custom-installer'] as $pattern => $specs) {
                foreach ($specs as $spec) {
                    $match = array();
                    // Type matching
                    if (preg_match('/^type:(.*)$/', $spec, $match)) {
                        $this->types[$match[1]] = $pattern;
                    } // Else it must be the package name.
                    else {
                        $this->packages[$spec] = $pattern;
                    }
                }
            }
        }
    }
protected function convert ( $ extra ) { if ( isset ( $ extra [ 'custom-installer' ] ) ) { foreach ( $ extra [ 'custom-installer' ] as $ pattern => $ specs ) { foreach ( $ specs as $ spec ) { $ match = array ( ) ; // Type matching if ( preg_match ( '/^type:(.*)$/' , $ spec , $ match ) ) { $ this -> types [ $ match [ 1 ] ] = $ pattern ; } // Else it must be the package name. else { $ this -> packages [ $ spec ] = $ pattern ; } } } } }
Converts the given extra data to relevant configuration values.
Converts the given extra data to relevant configuration values .