function make_public($ttl=86400)
    {
        if ($this->cfs_http->getCDNMUrl() == NULL) {
            throw new CDNNotEnabledException(
                "Authentication response did not indicate CDN availability");
        }
        if ($this->cdn_uri != NULL) {
            # previously published, assume we're setting new attributes
            list($status, $reason, $cdn_uri) =
                $this->cfs_http->update_cdn_container($this->name,$ttl,
                                                      $this->cdn_log_retention,
                                                      $this->cdn_acl_user_agent,
                                                      $this->cdn_acl_referrer);
            #if ($status == 401 && $this->_re_auth()) {
            #    return $this->make_public($ttl);
            #}
            if ($status == 404) {
                # this instance _thinks_ the container was published, but the
                # cdn management system thinks otherwise - try again with a PUT
                list($status, $reason, $cdn_uri) =
                    $this->cfs_http->add_cdn_container($this->name,$ttl);

            }
        } else {
            # publish it for first time
            list($status, $reason, $cdn_uri) =
                $this->cfs_http->add_cdn_container($this->name,$ttl);
        }
        #if ($status == 401 && $this->_re_auth()) {
        #    return $this->make_public($ttl);
        #}
        if (!in_array($status, array(201,202))) {
            throw new InvalidResponseException(
                "Invalid response (".$status."): ".$this->cfs_http->get_error());
        }
        $this->cdn_enabled = True;
        $this->cdn_ttl = $ttl;
        $this->cdn_uri = $cdn_uri;
        $this->cdn_log_retention = False;
        $this->cdn_acl_user_agent = "";
        $this->cdn_acl_referrer = "";
        return $this->cdn_uri;
    }
function make_public($ttl=86400)
    {
        if ($this->cfs_http->getCDNMUrl() == NULL) {
            throw new CDNNotEnabledException(
                "Authentication response did not indicate CDN availability");
        }
        if ($this->cdn_uri != NULL) {
            # previously published, assume we're setting new attributes
            list($status, $reason, $cdn_uri) =
                $this->cfs_http->update_cdn_container($this->name,$ttl,
                                                      $this->cdn_log_retention,
                                                      $this->cdn_acl_user_agent,
                                                      $this->cdn_acl_referrer);
            #if ($status == 401 && $this->_re_auth()) {
            #    return $this->make_public($ttl);
            #}
            if ($status == 404) {
                # this instance _thinks_ the container was published, but the
                # cdn management system thinks otherwise - try again with a PUT
                list($status, $reason, $cdn_uri) =
                    $this->cfs_http->add_cdn_container($this->name,$ttl);

            }
        } else {
            # publish it for first time
            list($status, $reason, $cdn_uri) =
                $this->cfs_http->add_cdn_container($this->name,$ttl);
        }
        #if ($status == 401 && $this->_re_auth()) {
        #    return $this->make_public($ttl);
        #}
        if (!in_array($status, array(201,202))) {
            throw new InvalidResponseException(
                "Invalid response (".$status."): ".$this->cfs_http->get_error());
        }
        $this->cdn_enabled = True;
        $this->cdn_ttl = $ttl;
        $this->cdn_uri = $cdn_uri;
        $this->cdn_log_retention = False;
        $this->cdn_acl_user_agent = "";
        $this->cdn_acl_referrer = "";
        return $this->cdn_uri;
    }
function make_public ( $ ttl = 86400 ) { if ( $ this -> cfs_http -> getCDNMUrl ( ) == NULL ) { throw new CDNNotEnabledException ( "Authentication response did not indicate CDN availability" ) ; } if ( $ this -> cdn_uri != NULL ) { # previously published, assume we're setting new attributes list ( $ status , $ reason , $ cdn_uri ) = $ this -> cfs_http -> update_cdn_container ( $ this -> name , $ ttl , $ this -> cdn_log_retention , $ this -> cdn_acl_user_agent , $ this -> cdn_acl_referrer ) ; #if ($status == 401 && $this->_re_auth()) { #    return $this->make_public($ttl); #} if ( $ status == 404 ) { # this instance _thinks_ the container was published, but the # cdn management system thinks otherwise - try again with a PUT list ( $ status , $ reason , $ cdn_uri ) = $ this -> cfs_http -> add_cdn_container ( $ this -> name , $ ttl ) ; } } else { # publish it for first time list ( $ status , $ reason , $ cdn_uri ) = $ this -> cfs_http -> add_cdn_container ( $ this -> name , $ ttl ) ; } #if ($status == 401 && $this->_re_auth()) { #    return $this->make_public($ttl); #} if ( ! in_array ( $ status , array ( 201 , 202 ) ) ) { throw new InvalidResponseException ( "Invalid response (" . $ status . "): " . $ this -> cfs_http -> get_error ( ) ) ; } $ this -> cdn_enabled = True ; $ this -> cdn_ttl = $ ttl ; $ this -> cdn_uri = $ cdn_uri ; $ this -> cdn_log_retention = False ; $ this -> cdn_acl_user_agent = "" ; $ this -> cdn_acl_referrer = "" ; return $ this -> cdn_uri ; }
Enable Container content to be served via CDN or modify CDN attributes

Either enable this Container's content to be served via CDN or
adjust its CDN attributes.  This Container will always return the
same CDN-enabled URI each time it is toggled public/private/public.

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

$public_container = $conn->create_container("public");

# CDN-enable the container and set it's TTL for a month
#
$public_container->make_public(86400/2); # 12 hours (86400 seconds/day)
</code>

@param int $ttl the time in seconds content will be cached in the CDN
@returns string the CDN enabled Container's URI
@throws CDNNotEnabledException CDN functionality not returned during auth
@throws AuthenticationException if auth token is not valid/expired
@throws InvalidResponseException unexpected response
Enable Container content to be served via CDN or modify CDN attributes