public function loadFromArray(array $array)
    {
        if (isset($array['filename'])) {
            $this->filename = $array['filename'];
        }

        if (isset($array['size'])) {
            $this->size = $array['size'];
        }

        if (isset($array['type'])) {
            $this->type = $array['type'];
        }

        if (isset($array['cid'])) {
            $this->cid = $array['cid'];
        }

        if (isset($array['href'])) {
            $this->href = $array['href'];
        }

        return $this;
    }
public function loadFromArray(array $array)
    {
        if (isset($array['filename'])) {
            $this->filename = $array['filename'];
        }

        if (isset($array['size'])) {
            $this->size = $array['size'];
        }

        if (isset($array['type'])) {
            $this->type = $array['type'];
        }

        if (isset($array['cid'])) {
            $this->cid = $array['cid'];
        }

        if (isset($array['href'])) {
            $this->href = $array['href'];
        }

        return $this;
    }
public function loadFromArray ( array $ array ) { if ( isset ( $ array [ 'filename' ] ) ) { $ this -> filename = $ array [ 'filename' ] ; } if ( isset ( $ array [ 'size' ] ) ) { $ this -> size = $ array [ 'size' ] ; } if ( isset ( $ array [ 'type' ] ) ) { $ this -> type = $ array [ 'type' ] ; } if ( isset ( $ array [ 'cid' ] ) ) { $ this -> cid = $ array [ 'cid' ] ; } if ( isset ( $ array [ 'href' ] ) ) { $ this -> href = $ array [ 'href' ] ; } return $ this ; }
Loads data into the Attachment from an array.

@param array $array

@return Attachment
Loads data into the Attachment from an array .