Doctrine\OXM\Storage\Storage::update PHP Method

update() public method

Update the XML in the storage system with a specific identifier
public update ( ClassMetadataInfo $classMetadata, string $id, string $xmlContent ) : void
$classMetadata Doctrine\OXM\Mapping\ClassMetadataInfo
$id string
$xmlContent string
return void
    function update(ClassMetadataInfo $classMetadata, $id, $xmlContent);

Usage Example

Exemplo n.º 1
0
 /**
  * Updates this xml entity in the storage system
  *
  * @param  $xmlEntity
  * @return bool|int
  */
 public function update($xmlEntity)
 {
     $identifier = $this->metadata->getIdentifierValue($xmlEntity);
     $xml = $this->marshaller->marshalToString($xmlEntity);
     return $this->storage->update($this->metadata, $identifier, $xml);
 }