MessagePack\TypeTransformer\Collection::remove PHP Method

remove() public method

public remove ( integer $id )
$id integer
    public function remove($id)
    {
        unset($this->items[$id]);
    }

Usage Example

Ejemplo n.º 1
0
 public function testAddRemoveFind()
 {
     $id = 5;
     $transformer = $this->getTransformerMock($id);
     $this->coll->add($transformer);
     $this->assertSame($transformer, $this->coll->find($id));
     $this->coll->remove($id);
     $this->assertNull($this->coll->find($id));
 }