public function countParts()
    {
        if ($this->_countParts) {
            return $this->_countParts;
        }

        $this->_countParts = count($this->_parts);
        if ($this->_countParts) {
            return $this->_countParts;
        }

        if ($this->_mail && $this->_mail->hasFetchPart) {
            // TODO: fetch part
            // return
        }

        $this->_cacheContent();

        $this->_countParts = count($this->_parts);
        return $this->_countParts;
    }
public function countParts()
    {
        if ($this->_countParts) {
            return $this->_countParts;
        }

        $this->_countParts = count($this->_parts);
        if ($this->_countParts) {
            return $this->_countParts;
        }

        if ($this->_mail && $this->_mail->hasFetchPart) {
            // TODO: fetch part
            // return
        }

        $this->_cacheContent();

        $this->_countParts = count($this->_parts);
        return $this->_countParts;
    }
public function countParts ( ) { if ( $ this -> _countParts ) { return $ this -> _countParts ; } $ this -> _countParts = count ( $ this -> _parts ) ; if ( $ this -> _countParts ) { return $ this -> _countParts ; } if ( $ this -> _mail && $ this -> _mail -> hasFetchPart ) { // TODO: fetch part // return } $ this -> _cacheContent ( ) ; $ this -> _countParts = count ( $ this -> _parts ) ; return $ this -> _countParts ; }
Count parts of a multipart part

@return int number of sub-parts
Count parts of a multipart part