public function persist($identifier, ParameterBagInterface $parameterBag)
    {
        $stateFilename = $this->getStateFilename($identifier);
        if (!touch($stateFilename) || (file_exists($stateFilename) && !is_writable($stateFilename))) {
            throw new IOException("State isn't writable!");
        }

        file_put_contents($stateFilename, serialize($parameterBag));
    }
public function persist($identifier, ParameterBagInterface $parameterBag)
    {
        $stateFilename = $this->getStateFilename($identifier);
        if (!touch($stateFilename) || (file_exists($stateFilename) && !is_writable($stateFilename))) {
            throw new IOException("State isn't writable!");
        }

        file_put_contents($stateFilename, serialize($parameterBag));
    }
public function persist ( $ identifier , ParameterBagInterface $ parameterBag ) { $ stateFilename = $ this -> getStateFilename ( $ identifier ) ; if ( ! touch ( $ stateFilename ) || ( file_exists ( $ stateFilename ) && ! is_writable ( $ stateFilename ) ) ) { throw new IOException ( "State isn't writable!" ) ; } file_put_contents ( $ stateFilename , serialize ( $ parameterBag ) ) ; }
Puts the parameter bag to a persistent storage.

@param string                $identifier
@param ParameterBagInterface $parameterBag

@throws IOException If the state file isn't writable.

@return void
Puts the parameter bag to a persistent storage .