public function setType($type)
    {
        if ($this->type() === $type) {
            return $type;
        }

        // Catch any API Request Exceptions here
        // so we can replace exception message
        // with more informative one.

        try {
            $this->setMeta(['Type' => $type]);
        } catch (ApiRequestFailedException $e) {
            throw new ApiRequestFailedException('Unable to set container type to "'.$type.'".', $e->getCode());
        }

        return $this->data['type'] = $type;
    }
public function setType($type)
    {
        if ($this->type() === $type) {
            return $type;
        }

        // Catch any API Request Exceptions here
        // so we can replace exception message
        // with more informative one.

        try {
            $this->setMeta(['Type' => $type]);
        } catch (ApiRequestFailedException $e) {
            throw new ApiRequestFailedException('Unable to set container type to "'.$type.'".', $e->getCode());
        }

        return $this->data['type'] = $type;
    }
public function setType ( $ type ) { if ( $ this -> type ( ) === $ type ) { return $ type ; } // Catch any API Request Exceptions here // so we can replace exception message // with more informative one. try { $ this -> setMeta ( [ 'Type' => $ type ] ) ; } catch ( ApiRequestFailedException $ e ) { throw new ApiRequestFailedException ( 'Unable to set container type to "' . $ type . '".' , $ e -> getCode ( ) ) ; } return $ this -> data [ 'type' ] = $ type ; }
Updates container type.

@param string $type Container type: 'public', 'private' or 'gallery'.

@throws \ArgentCrusade\Selectel\CloudStorage\Exceptions\ApiRequestFailedException

@return string
Updates container type .