forked from lbrackspace/php-cloudfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Conrad Weidenkeller
committed
Feb 24, 2011
1 parent
694e8fd
commit 76dff8b
Showing
15 changed files
with
4,534 additions
and
4,563 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
1.7.7 Conrad Weidenkeller <[email protected]> | ||
* Added CDN Purge Functionality | ||
|
||
1.7.6 - Chmouel Boudjnah <[email protected]> | ||
* Add Cloud UK Support (conrad.weidenkeller). | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1068,7 +1068,37 @@ function make_public($ttl=86400) | |
$this->cdn_acl_referrer = ""; | ||
return $this->cdn_uri; | ||
} | ||
|
||
/** | ||
* Purge Containers objects from CDN Cache. | ||
* Example: | ||
* <code> | ||
* # ... authentication code excluded (see previous examples) ... | ||
* # | ||
* $conn = new CF_Authentication($auth); | ||
* $container = $conn->get_container("cdn_enabled"); | ||
* $container->purge_from_cdn("[email protected]"); | ||
* # or | ||
* $container->purge_from_cdn(); | ||
* # or | ||
* $container->purge_from_cdn("[email protected],[email protected]"); | ||
* @returns boolean True if successful | ||
* @throws CDNNotEnabledException if CDN Is not enabled on this connection | ||
* @throws InvalidResponseException if the response expected is not returned | ||
*/ | ||
function purge_from_cdn($email=null) | ||
{ | ||
if (!$this->cfs_http->getCDNMUrl()) | ||
{ | ||
throw new CDNNotEnabledException( | ||
"Authentication response did not indicate CDN availability"); | ||
} | ||
$status = $this->cfs_http->purge_from_cdn($this->name, $email); | ||
if ($status < 199 or $status > 299) { | ||
throw new InvalidResponseException( | ||
"Invalid response (".$status."): ".$this->cfs_http->get_error()); | ||
} | ||
return True; | ||
} | ||
/** | ||
* Enable ACL restriction by User Agent for this container. | ||
* | ||
|
@@ -2065,6 +2095,38 @@ function save_to_filename($filename) | |
fclose($fp); | ||
return $result; | ||
} | ||
/** | ||
* Purge this Object from CDN Cache. | ||
* Example: | ||
* <code> | ||
* # ... authentication code excluded (see previous examples) ... | ||
* # | ||
* $conn = new CF_Authentication($auth); | ||
* $container = $conn->get_container("cdn_enabled"); | ||
* $obj = $container->get_object("object"); | ||
* $obj->purge_from_cdn("[email protected]"); | ||
* # or | ||
* $obj->purge_from_cdn(); | ||
* # or | ||
* $obj->purge_from_cdn("[email protected],[email protected]"); | ||
* @returns boolean True if successful | ||
* @throws CDNNotEnabledException if CDN Is not enabled on this connection | ||
* @throws InvalidResponseException if the response expected is not returned | ||
*/ | ||
function purge_from_cdn($email=null) | ||
{ | ||
if (!$this->container->cfs_http->getCDNMUrl()) | ||
{ | ||
throw new CDNNotEnabledException( | ||
"Authentication response did not indicate CDN availability"); | ||
} | ||
$status = $this->container->cfs_http->purge_from_cdn($this->container->name . "/" . $this->name, $email); | ||
if ($status < 199 or $status > 299) { | ||
throw new InvalidResponseException( | ||
"Invalid response (".$status."): ".$this->container->cfs_http->get_error()); | ||
} | ||
return True; | ||
} | ||
|
||
/** | ||
* Set Object's MD5 checksum | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,74 @@ | ||
<?xml version="1.0" encoding="iso-8859-1"?> | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<!-- template designed by Marco Von Ballmoos --> | ||
<title></title> | ||
<link rel="stylesheet" href="media/stylesheet.css" /> | ||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> | ||
</head> | ||
<body> | ||
|
||
<!-- Start of Class Data --> | ||
<H2> | ||
|
||
</H2> | ||
<h2>Root class CF_Authentication</h2> | ||
<html> | ||
<head> | ||
<title>Class Trees for Package php-cloudfiles</title> | ||
<link rel="stylesheet" type="text/css" href="media/style.css"> | ||
</head> | ||
<body> | ||
|
||
<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%"> | ||
<tr> | ||
<td class="header_top">php-cloudfiles</td> | ||
</tr> | ||
<tr><td class="header_line"><img src="media/empty.png" width="1" height="1" border="0" alt="" /></td></tr> | ||
<tr> | ||
<td class="header_menu"> | ||
|
||
|
||
[ <a href="classtrees_php-cloudfiles.html" class="menu">class tree: php-cloudfiles</a> ] | ||
[ <a href="elementindex_php-cloudfiles.html" class="menu">index: php-cloudfiles</a> ] | ||
[ <a href="elementindex.html" class="menu">all elements</a> ] | ||
</td> | ||
</tr> | ||
<tr><td class="header_line"><img src="media/empty.png" width="1" height="1" border="0" alt="" /></td></tr> | ||
</table> | ||
|
||
<table width="100%" border="0" cellpadding="0" cellspacing="0"> | ||
<tr valign="top"> | ||
<td width="200" class="menu"> | ||
<div id="ric"> | ||
<p><a href="ric_AUTHORS.html">AUTHORS</a></p> | ||
<p><a href="ric_COPYING.html">COPYING</a></p> | ||
<p><a href="ric_README.html">README</a></p> | ||
<p><a href="ric_Changelog.html">Changelog</a></p> | ||
</div> | ||
<b>Packages:</b><br /> | ||
<a href="li_php-cloudfiles.html">php-cloudfiles</a><br /> | ||
<a href="li_php-cloudfiles-exceptions.html">php-cloudfiles-exceptions</a><br /> | ||
<a href="li_php-cloudfiles-http.html">php-cloudfiles-http</a><br /> | ||
<br /><br /> | ||
</td> | ||
<td> | ||
<table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top"> | ||
|
||
<h1>Class Trees for Package php-cloudfiles</h1> | ||
<hr /> | ||
<div class="classtree">Root class CF_Authentication</div><br /> | ||
<ul> | ||
<li><a href="php-cloudfiles/CF_Authentication.html">CF_Authentication</a></li></ul> | ||
|
||
<h2>Root class CF_Connection</h2> | ||
<hr /> | ||
<div class="classtree">Root class CF_Connection</div><br /> | ||
<ul> | ||
<li><a href="php-cloudfiles/CF_Connection.html">CF_Connection</a></li></ul> | ||
|
||
<h2>Root class CF_Container</h2> | ||
<hr /> | ||
<div class="classtree">Root class CF_Container</div><br /> | ||
<ul> | ||
<li><a href="php-cloudfiles/CF_Container.html">CF_Container</a></li></ul> | ||
|
||
<h2>Root class CF_Object</h2> | ||
<hr /> | ||
<div class="classtree">Root class CF_Object</div><br /> | ||
<ul> | ||
<li><a href="php-cloudfiles/CF_Object.html">CF_Object</a></li></ul> | ||
|
||
<p class="notes" id="credit"> | ||
Documentation generated on Tue, 14 Dec 2010 05:19:53 -0600 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a> | ||
</p> | ||
</body> | ||
<div class="credit"> | ||
<hr /> | ||
Documentation generated on Thu, 24 Feb 2011 15:05:56 -0600 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a> | ||
</div> | ||
</td></tr></table> | ||
</td> | ||
</tr> | ||
</table> | ||
|
||
</body> | ||
</html> |
Oops, something went wrong.