src/Liip/Drupal/Modules/Registry/Database/MySql.php
public function replace($identifier, $value)
    {
        // store current data to be able to restore on error;
        $oldValue = @$this->registry[$this->section][$identifier];

        parent::replace($identifier, $value);

        $sql = sprintf(
            'UPDATE %s SET `data`=`%s` WHERE `entityId`=`%s`;',
            $this->mysql->quote($this->section),
            $this->mysql->quote($value),
            $this->mysql->quote($identifier)
        );

        $result = $this->mysql->exec($sql);

        if (false === $result) {

            $this->registry[$this->section][$identifier] = $oldValue;

            $this->throwException(
                'Failed to fetch information from the registry: ',
                $this->mysql->errorInfo()
            );
        }
    }
public function replace($identifier, $value)
    {
        // store current data to be able to restore on error;
        $oldValue = @$this->registry[$this->section][$identifier];

        parent::replace($identifier, $value);

        $sql = sprintf(
            'UPDATE %s SET `data`=`%s` WHERE `entityId`=`%s`;',
            $this->mysql->quote($this->section),
            $this->mysql->quote($value),
            $this->mysql->quote($identifier)
        );

        $result = $this->mysql->exec($sql);

        if (false === $result) {

            $this->registry[$this->section][$identifier] = $oldValue;

            $this->throwException(
                'Failed to fetch information from the registry: ',
                $this->mysql->errorInfo()
            );
        }
    }
public function replace ( $ identifier , $ value ) { // store current data to be able to restore on error; $ oldValue = @ $ this -> registry [ $ this -> section ] [ $ identifier ] ; parent :: replace ( $ identifier , $ value ) ; $ sql = sprintf ( 'UPDATE %s SET `data`=`%s` WHERE `entityId`=`%s`;' , $ this -> mysql -> quote ( $ this -> section ) , $ this -> mysql -> quote ( $ value ) , $ this -> mysql -> quote ( $ identifier ) ) ; $ result = $ this -> mysql -> exec ( $ sql ) ; if ( false === $ result ) { $ this -> registry [ $ this -> section ] [ $ identifier ] = $ oldValue ; $ this -> throwException ( 'Failed to fetch information from the registry: ' , $ this -> mysql -> errorInfo ( ) ) ; } }
Replaces the identified entity with the provided one.

@param string $identifier
@param mixed $value
Replaces the identified entity with the provided one .