public function remove($key)
    {
        $element = $this->getElement($key);
        
        if ($element !== false && $this->collection->removeElement($element)) {
            return $element;
        }
    }
public function remove($key)
    {
        $element = $this->getElement($key);
        
        if ($element !== false && $this->collection->removeElement($element)) {
            return $element;
        }
    }
{@inheritDoc}