src/ConfigurationReader/GeneratorOptions.php
public function setComposerSettings(array $composerSettings = [])
    {
        /**
         * If array is type array("config.value:true","require:library/src",)
         */
        $settings = [];
        foreach ($composerSettings as $index => $value) {
            if (is_numeric($index) && mb_strpos($value, ':') > 0) {
                $path = implode('', array_slice(explode(':', $value), 0, 1));
                $val = implode(':', array_slice(explode(':', $value), 1));
                self::dotNotationToArray($path, $val, $settings);
            } else {
                $settings[$index] = $value;
            }
        }
        return $this->setOptionValue(self::COMPOSER_SETTINGS, $settings);
    }
public function setComposerSettings(array $composerSettings = [])
    {
        /**
         * If array is type array("config.value:true","require:library/src",)
         */
        $settings = [];
        foreach ($composerSettings as $index => $value) {
            if (is_numeric($index) && mb_strpos($value, ':') > 0) {
                $path = implode('', array_slice(explode(':', $value), 0, 1));
                $val = implode(':', array_slice(explode(':', $value), 1));
                self::dotNotationToArray($path, $val, $settings);
            } else {
                $settings[$index] = $value;
            }
        }
        return $this->setOptionValue(self::COMPOSER_SETTINGS, $settings);
    }
public function setComposerSettings ( array $ composerSettings = [ ] ) { /**
         * If array is type array("config.value:true","require:library/src",)
         */ $ settings = [ ] ; foreach ( $ composerSettings as $ index => $ value ) { if ( is_numeric ( $ index ) && mb_strpos ( $ value , ':' ) > 0 ) { $ path = implode ( '' , array_slice ( explode ( ':' , $ value ) , 0 , 1 ) ) ; $ val = implode ( ':' , array_slice ( explode ( ':' , $ value ) , 1 ) ) ; self :: dotNotationToArray ( $ path , $ val , $ settings ) ; } else { $ settings [ $ index ] = $ value ; } } return $ this -> setOptionValue ( self :: COMPOSER_SETTINGS , $ settings ) ; }
Set current composer settings option value
@throws \InvalidArgumentException
@param array $composerSettings
@return GeneratorOptions
Set current composer settings option value