function delete_container($container=NULL)
    {
        $container_name = NULL;
        
        if (is_object($container)) {
            if (get_class($container) == "CF_Container") {
                $container_name = $container->name;
            }
        }
        if (is_string($container)) {
            $container_name = $container;
        }
        if (!$container_name) {
            throw new SyntaxException("Must specify container object or name.");
        }

        $return_code = $this->cfs_http->delete_container($container_name);

        if (!$return_code) {
            throw new InvalidResponseException("Failed to obtain http response");
        }
        #if ($status == 401 && $this->_re_auth()) {
        #    return $this->delete_container($container);
        #}
        if ($return_code == 409) {
            throw new NonEmptyContainerException(
                "Container must be empty prior to removing it.");
        }
        if ($return_code == 404) {
            throw new NoSuchContainerException(
                "Specified container did not exist to delete.");
        }
        if ($return_code != 204) {
            throw new InvalidResponseException(
                "Invalid response (".$return_code."): "
                . $this->cfs_http->get_error());
        }
        return True;
    }
function delete_container($container=NULL)
    {
        $container_name = NULL;
        
        if (is_object($container)) {
            if (get_class($container) == "CF_Container") {
                $container_name = $container->name;
            }
        }
        if (is_string($container)) {
            $container_name = $container;
        }
        if (!$container_name) {
            throw new SyntaxException("Must specify container object or name.");
        }

        $return_code = $this->cfs_http->delete_container($container_name);

        if (!$return_code) {
            throw new InvalidResponseException("Failed to obtain http response");
        }
        #if ($status == 401 && $this->_re_auth()) {
        #    return $this->delete_container($container);
        #}
        if ($return_code == 409) {
            throw new NonEmptyContainerException(
                "Container must be empty prior to removing it.");
        }
        if ($return_code == 404) {
            throw new NoSuchContainerException(
                "Specified container did not exist to delete.");
        }
        if ($return_code != 204) {
            throw new InvalidResponseException(
                "Invalid response (".$return_code."): "
                . $this->cfs_http->get_error());
        }
        return True;
    }
function delete_container ( $ container = NULL ) { $ container_name = NULL ; if ( is_object ( $ container ) ) { if ( get_class ( $ container ) == "CF_Container" ) { $ container_name = $ container -> name ; } } if ( is_string ( $ container ) ) { $ container_name = $ container ; } if ( ! $ container_name ) { throw new SyntaxException ( "Must specify container object or name." ) ; } $ return_code = $ this -> cfs_http -> delete_container ( $ container_name ) ; if ( ! $ return_code ) { throw new InvalidResponseException ( "Failed to obtain http response" ) ; } #if ($status == 401 && $this->_re_auth()) { #    return $this->delete_container($container); #} if ( $ return_code == 409 ) { throw new NonEmptyContainerException ( "Container must be empty prior to removing it." ) ; } if ( $ return_code == 404 ) { throw new NoSuchContainerException ( "Specified container did not exist to delete." ) ; } if ( $ return_code != 204 ) { throw new InvalidResponseException ( "Invalid response (" . $ return_code . "): " . $ this -> cfs_http -> get_error ( ) ) ; } return True ; }
Delete a Container

Given either a Container instance or name, remove the remote Container.
The Container must be empty prior to removing it.

Example:
<code>
# ... authentication code excluded (see previous examples) ...
#
$conn = new CF_Authentication($auth);

$conn->delete_container("my photos");
</code>

@param string|obj $container container name or instance
@return boolean <kbd>True</kbd> if successfully deleted
@throws SyntaxException missing proper argument
@throws InvalidResponseException invalid response
@throws NonEmptyContainerException container not empty
@throws NoSuchContainerException remote container does not exist
Delete a Container