(No version information available, might only be in Git)
CollectionModify::replace — Replace document field
$collection_field
, string $expression_or_literal
)Replace (update) a given field value with a new one.
This function is currently not documented; only its argument list is available.
collection_field
The document path of the item to set.
expression_or_literal
The value to set on the specified attribute.
A CollectionModify object.
Example #1 mysql_xdevapi\CollectionModify::replace() example
<?php
$res = $data = $obj->sort(['_id desc'])->limit(2)->replace('job', 'Disoccupato')->execute();
?>