src/Composer/ComposerHydrationHandler.php
public function getReplaceValuesFromArgument($argValues)
    {
        $replaceValues = array();

        $argValues = explode(',', $argValues);
        foreach ($argValues as $argValue) {
            $argValue = explode(':', $argValue);
            if (count($argValue) != 2) {
                $msg = 'Command argument "--replace" must follow the format: --replace="{SEARCH}:{REPLACE},..."';
                throw new \ErrorException($msg);
            }

            $search = trim($argValue[0]);
            $replace = trim($argValue[1]);
            if ($this->isMagicVariable($replace)) {
                // Is magic variable, so, replace by the magic value.
                $replace = $this->getMagicVariableValue($replace);
            }

            $replaceValues[$search] = $replace;
        }

        return $replaceValues;
    }
public function getReplaceValuesFromArgument($argValues)
    {
        $replaceValues = array();

        $argValues = explode(',', $argValues);
        foreach ($argValues as $argValue) {
            $argValue = explode(':', $argValue);
            if (count($argValue) != 2) {
                $msg = 'Command argument "--replace" must follow the format: --replace="{SEARCH}:{REPLACE},..."';
                throw new \ErrorException($msg);
            }

            $search = trim($argValue[0]);
            $replace = trim($argValue[1]);
            if ($this->isMagicVariable($replace)) {
                // Is magic variable, so, replace by the magic value.
                $replace = $this->getMagicVariableValue($replace);
            }

            $replaceValues[$search] = $replace;
        }

        return $replaceValues;
    }
public function getReplaceValuesFromArgument ( $ argValues ) { $ replaceValues = array ( ) ; $ argValues = explode ( ',' , $ argValues ) ; foreach ( $ argValues as $ argValue ) { $ argValue = explode ( ':' , $ argValue ) ; if ( count ( $ argValue ) != 2 ) { $ msg = 'Command argument "--replace" must follow the format: --replace="{SEARCH}:{REPLACE},..."' ; throw new \ ErrorException ( $ msg ) ; } $ search = trim ( $ argValue [ 0 ] ) ; $ replace = trim ( $ argValue [ 1 ] ) ; if ( $ this -> isMagicVariable ( $ replace ) ) { // Is magic variable, so, replace by the magic value. $ replace = $ this -> getMagicVariableValue ( $ replace ) ; } $ replaceValues [ $ search ] = $ replace ; } return $ replaceValues ; }
Returns an array containing the replace values from command argument.

@param string $argValues
Command argument replace value.

@return array
An array, following the format: SEARCH => REPLACE.
Returns an array containing the replace values from command argument .