public function load($identifier, ParameterBagInterface $parameterBag)
    {
        $stateFilename = $this->getStateFilename($identifier);
        if (!file_exists($stateFilename)) {
            throw new IOException("State file {$stateFilename} doesn't exist!");
        }

        $stateFileContent = file_get_contents($stateFilename);

        $parameterBag->add(unserialize($stateFileContent));
    }
public function load($identifier, ParameterBagInterface $parameterBag)
    {
        $stateFilename = $this->getStateFilename($identifier);
        if (!file_exists($stateFilename)) {
            throw new IOException("State file {$stateFilename} doesn't exist!");
        }

        $stateFileContent = file_get_contents($stateFilename);

        $parameterBag->add(unserialize($stateFileContent));
    }
public function load ( $ identifier , ParameterBagInterface $ parameterBag ) { $ stateFilename = $ this -> getStateFilename ( $ identifier ) ; if ( ! file_exists ( $ stateFilename ) ) { throw new IOException ( "State file {$stateFilename} doesn't exist!" ) ; } $ stateFileContent = file_get_contents ( $ stateFilename ) ; $ parameterBag -> add ( unserialize ( $ stateFileContent ) ) ; }
Loads the parameter bag from a persistent storage.

@param string                $identifier
@param ParameterBagInterface $parameterBag

@throws IOException If state file doesn't exist.

@return void
Loads the parameter bag from a persistent storage .