public function updateForUserClass(string $yamlSource, UserClassConfiguration $userConfig, string $userClass): string
    {
        $this->manipulator = new YamlSourceManipulator($yamlSource);

        $this->normalizeSecurityYamlFile();

        $this->updateProviders($userConfig, $userClass);

        if ($userConfig->hasPassword()) {
            $this->updateEncoders($userConfig, $userClass);
        }

        $contents = $this->manipulator->getContents();
        $this->manipulator = null;

        return $contents;
    }
public function updateForUserClass(string $yamlSource, UserClassConfiguration $userConfig, string $userClass): string
    {
        $this->manipulator = new YamlSourceManipulator($yamlSource);

        $this->normalizeSecurityYamlFile();

        $this->updateProviders($userConfig, $userClass);

        if ($userConfig->hasPassword()) {
            $this->updateEncoders($userConfig, $userClass);
        }

        $contents = $this->manipulator->getContents();
        $this->manipulator = null;

        return $contents;
    }
public function updateForUserClass ( string $ yamlSource , UserClassConfiguration $ userConfig , string $ userClass ) : string { $ this -> manipulator = new YamlSourceManipulator ( $ yamlSource ) ; $ this -> normalizeSecurityYamlFile ( ) ; $ this -> updateProviders ( $ userConfig , $ userClass ) ; if ( $ userConfig -> hasPassword ( ) ) { $ this -> updateEncoders ( $ userConfig , $ userClass ) ; } $ contents = $ this -> manipulator -> getContents ( ) ; $ this -> manipulator = null ; return $ contents ; }
Updates security.yaml contents based on a new User class.

@param string                 $yamlSource
@param UserClassConfiguration $userConfig
@param string                 $userClass

@return string
Updates security . yaml contents based on a new User class .