public function clearBody($name = null)
    {
        if (null !== $name) {
            $name = (string) $name;
            if (isset($this->_body[$name])) {
                unset($this->_body[$name]);
                return true;
            }

            return false;
        }

        $this->_body = array();
        return true;
    }
public function clearBody($name = null)
    {
        if (null !== $name) {
            $name = (string) $name;
            if (isset($this->_body[$name])) {
                unset($this->_body[$name]);
                return true;
            }

            return false;
        }

        $this->_body = array();
        return true;
    }
public function clearBody ( $ name = null ) { if ( null !== $ name ) { $ name = ( string ) $ name ; if ( isset ( $ this -> _body [ $ name ] ) ) { unset ( $ this -> _body [ $ name ] ) ; return true ; } return false ; } $ this -> _body = array ( ) ; return true ; }
Clear body array

With no arguments, clears the entire body array. Given a $name, clears
just that named segment; if no segment matching $name exists, returns
false to indicate an error.

@param  string $name Named segment to clear
@return boolean
Clear body array