public function remove($element)
    {
        if (!$this->contains($element)) {
            return false;
        }

        $this->offsetUnset($this->indexOf($element));

        return true;
    }
public function remove($element)
    {
        if (!$this->contains($element)) {
            return false;
        }

        $this->offsetUnset($this->indexOf($element));

        return true;
    }
public function remove ( $ element ) { if ( ! $ this -> contains ( $ element ) ) { return false ; } $ this -> offsetUnset ( $ this -> indexOf ( $ element ) ) ; return true ; }
Remove element from collection

@param $element
@return bool
Remove element from collection