src/ORM/ArrayList.php
public function replace($item, $with)
    {
        foreach ($this->items as $key => $candidate) {
            if ($candidate === $item) {
                $this->items[$key] = $with;
                return;
            }
        }
    }
public function replace($item, $with)
    {
        foreach ($this->items as $key => $candidate) {
            if ($candidate === $item) {
                $this->items[$key] = $with;
                return;
            }
        }
    }
public function replace ( $ item , $ with ) { foreach ( $ this -> items as $ key => $ candidate ) { if ( $ candidate === $ item ) { $ this -> items [ $ key ] = $ with ; return ; } } }
Replaces an item in this list with another item.

@param array|object $item
@param array|object $with
@return void;
Replaces an item in this list with another item .