Public Member Functions | |
__construct (&$cfs_auth, &$cfs_http, $name, $count=0, $bytes=0) | |
__toString () | |
create_object ($obj_name=NULL) | |
get_object ($obj_name=NULL) | |
list_objects ($limit=0, $marker=NULL, $prefix=NULL, $path=NULL) | |
get_objects ($limit=0, $marker=NULL, $prefix=NULL, $path=NULL, $delimiter=NULL) | |
copy_object_to ($obj, $container_target, $dest_obj_name=NULL, $metadata=NULL, $headers=NULL) | |
copy_object_from ($obj, $container_source, $dest_obj_name=NULL, $metadata=NULL, $headers=NULL) | |
move_object_to ($obj, $container_target, $dest_obj_name=NULL, $metadata=NULL, $headers=NULL) | |
move_object_from ($obj, $container_source, $dest_obj_name=NULL, $metadata=NULL, $headers=NULL) | |
delete_object ($obj, $container=NULL) | |
enableStaticWebsiteConfig ($index=NULL, $error=NULL, $listings=NULL, $css=NULL) | |
disableStaticWebsiteConfig () | |
enableContainerLogging () | |
disableContainerLogging () | |
make_public () | |
make_private () | |
addUpdate_container_user_metadata ($key, $value) | |
delete_container_user_metadata ($key) | |
create_paths ($path_name) | |
Data Fields | |
$cfs_auth | |
$cfs_http | |
$name | |
$object_count | |
$bytes_used | |
$metadata | |
Definition at line 835 of file cloudfiles-kt.php.
__construct | ( | & | $cfs_auth, |
& | $cfs_http, | ||
$name, | |||
$count = 0 , |
|||
$bytes = 0 |
|||
) |
Class constructor
Constructor for Container
obj | $cfs_auth | CF_Authentication instance |
obj | $cfs_http | HTTP connection manager |
string | $name | name of Container |
int | $count | number of Objects stored in this Container |
int | $bytes | number of bytes stored in this Container |
SyntaxException | invalid Container name |
Definition at line 856 of file cloudfiles-kt.php.
__toString | ( | ) |
String representation of Container
Pretty print the Container instance.
Definition at line 882 of file cloudfiles-kt.php.
addUpdate_container_user_metadata | ( | $key, | |
$value | |||
) |
ÇØ´ç ÄÁÅ×À̳ʿ¡ »ç¿ëÀÚ Á¤ÀÇ metadata¸¦ Ãß°¡/°»½ÅÇÑ´Ù. »ç¿ëÀÚ metadata´Â ¸¶Áö¸· ÀúÀå°ªÀÌ À¯ÁöµÈ´Ù. Áï, ƯÁ¤ key¿¡ ´ëÇÑ metadata¸¦ °»½ÅÇÒ °æ¿ì ±âÁ¸ °ªÀº ¿äûµÈ °ªÀ¸·Î ´ëüµÇ°í ÀÌÀü °ªÀº »èÁ¦µÈ´Ù.
Example: ... authentication code excluded (see previous examples) ...
$conn = new CF_Connection($auth);
$test_container = $conn->get_container("test");
Config specific container
$test_container->addUpdate_container_user_metadata($key, $value);
key | $key | »ç¿ëÀÚ metadata¿¡ ´ëÇÑ key |
value | $value | »ç¿ëÀÚ metadata¿¡ ´ëÇÑ value |
True
if successfully removed Definition at line 1563 of file cloudfiles-kt.php.
copy_object_from | ( | $obj, | |
$container_source, | |||
$dest_obj_name = NULL , |
|||
$metadata = NULL , |
|||
$headers = NULL |
|||
) |
Copy a remote storage Object from a source Container
Given an Object instance or name and a source Container instance or name, copy copies the remote Object and all associated metadata.
Example: ... authentication code excluded (see previous examples) ...
$conn = new CF_Connection($auth);
$images = $conn->get_container("my photos");
Copy specific object
$images->copy_object_from("disco_dancing.jpg","container_source");
obj | $obj | name or instance of Object to copy |
obj | $container_source | name or instance of source Container |
string | $dest_obj_name | name of target object (optional - uses source name if omitted) |
array | $metadata | metadata array for new object (optional) |
array | $headers | header fields array for the new object (optional) |
true
if successfully copied SyntaxException | invalid Object/Container name |
NoSuchObjectException | remote Object does not exist |
InvalidResponseException | unexpected response |
Definition at line 1172 of file cloudfiles-kt.php.
copy_object_to | ( | $obj, | |
$container_target, | |||
$dest_obj_name = NULL , |
|||
$metadata = NULL , |
|||
$headers = NULL |
|||
) |
Copy a remote storage Object to a target Container
Given an Object instance or name and a target Container instance or name, copy copies the remote Object and all associated metadata.
Example: ... authentication code excluded (see previous examples) ...
$conn = new CF_Connection($auth);
$images = $conn->get_container("my photos");
Copy specific object
$images->copy_object_to("disco_dancing.jpg","container_target");
obj | $obj | name or instance of Object to copy |
obj | $container_target | name or instance of target Container |
string | $dest_obj_name | name of target object (optional - uses source name if omitted) |
array | $metadata | metadata array for new object (optional) |
array | $headers | header fields array for the new object (optional) |
true
if successfully copied SyntaxException | invalid Object/Container name |
NoSuchObjectException | remote Object does not exist |
InvalidResponseException | unexpected response |
Definition at line 1098 of file cloudfiles-kt.php.
create_object | ( | $obj_name = NULL | ) |
Create a new remote storage Object
Return a new Object instance. If the remote storage Object exists, the instance's attributes are populated.
Example: ... authentication code excluded (see previous examples) ...
$conn = new CF_Connection($auth);
$public_container = $conn->get_container("public");
This creates a local instance of a storage object but only creates it in the storage system when the object's write() method is called.
$pic = $public_container->create_object("baby.jpg");
string | $obj_name | name of storage Object |
Definition at line 912 of file cloudfiles-kt.php.
create_paths | ( | $path_name | ) |
Helper function to create "path" elements for a given Object name
Given an Object whose name contains '/' path separators, this function will create the "directory marker" Objects of one byte with the Content-Type of "application/directory".
It assumes the last element of the full path is the "real" Object and does NOT create a remote storage Object for that last element.
Definition at line 1617 of file cloudfiles-kt.php.
delete_container_user_metadata | ( | $key | ) |
ÇØ´ç ÄÁÅ×À̳ÊÀÇ »ç¿ëÀÚ Á¤ÀÇ metadata¸¦ »èÁ¦ÇÑ´Ù. ÁöÁ¤µÈ ƯÁ¤ key¿¡ ´ëÇÑ metadata¸¦ »èÁ¦ÇÑ´Ù.
Example: ... authentication code excluded (see previous examples) ...
$conn = new CF_Connection($auth);
$test_container = $conn->get_container("test");
Config specific container
$test_container->delete_container_user_metadata($key);
key | $key | »ç¿ëÀÚ metadata¿¡ ´ëÇÑ key |
True
if successfully removed Definition at line 1596 of file cloudfiles-kt.php.
delete_object | ( | $obj, | |
$container = NULL |
|||
) |
Delete a remote storage Object
Given an Object instance or name, permanently remove the remote Object and all associated metadata.
Example: ... authentication code excluded (see previous examples) ...
$conn = new CF_Connection($auth);
$images = $conn->get_container("my photos");
Delete specific object
$images->delete_object("disco_dancing.jpg");
obj | $obj | name or instance of Object to delete |
obj | $container | name or instance of Container in which the object resides (optional) |
True
if successfully removed SyntaxException | invalid Object name |
NoSuchObjectException | remote Object does not exist |
InvalidResponseException | unexpected response |
Definition at line 1324 of file cloudfiles-kt.php.
disableContainerLogging | ( | ) |
ÇØ´ç ÄÁÅ×À̳ʿ¡ ´ëÇÑ ·Î±ë ¼³Á¤À» ÇØÁ¦ÇÑ´Ù.
Example: ... authentication code excluded (see previous examples) ...
$conn = new CF_Connection($auth);
$test_container = $conn->get_container("test");
Config specific container
$test_container->disableContainerLogging();
True
if successfully removed Definition at line 1485 of file cloudfiles-kt.php.
disableStaticWebsiteConfig | ( | ) |
ÇØ´ç ÄÁÅ×À̳ÊÀÇ static website ¼³Á¤À» Ãë¼ÒÇÑ´Ù.
Example: ... authentication code excluded (see previous examples) ...
$conn = new CF_Connection($auth);
$test_container = $conn->get_container("test");
Config specific container
$test_container->disableStaticWebsiteConfig();
True
if successfully removed Definition at line 1431 of file cloudfiles-kt.php.
enableContainerLogging | ( | ) |
ÇØ´ç ÄÁÅ×À̳ʸ¦ ´ëÇÑ Á¢±ÙÁ¤º¸¸¦ ·Î±×ÆÄÀÏ·Î ÀúÀåÇÑ´Ù. ¼ºñ½º ÀÌ¿ë¹æ¹ýÀº °¡À̵带 ÂüÁ¶ÇÑ´Ù. https://ucloudbiz.olleh.com/manual/ucloud_storage_log_save_service_user_guide.pdf
Example: ... authentication code excluded (see previous examples) ...
$conn = new CF_Connection($auth);
$test_container = $conn->get_container("test");
Config specific container
$test_container->enableContainerLogging();
True
if successfully removed Definition at line 1461 of file cloudfiles-kt.php.
enableStaticWebsiteConfig | ( | $index = NULL , |
|
$error = NULL , |
|||
$listings = NULL , |
|||
$css = NULL |
|||
) |
ÇØ´ç ÄÁÅ×À̳ʸ¦ static website·Î ¼³Á¤ÇÑ´Ù. ¼ºñ½º ÀÌ¿ë¹æ¹ýÀº °¡À̵带 ÂüÁ¶ÇÑ´Ù. https://ucloudbiz.olleh.com/manual/ucloud_storage_Static_Web_service_user_guide.pdf
Example: ... authentication code excluded (see previous examples) ...
$conn = new CF_Connection($auth);
$test_container = $conn->get_container("test");
Config specific container
$test_container->enableStaticWebsiteConfig("index.html","error.hmtl", "true", "test.css");
index | $index | static website¿¡ ´ëÇÑ index ÆÄÀÏ ÁöÁ¤(ÀÓÀÇÁöÁ¤ °¡´É) |
error | $error | static website¿¡ ´ëÇÑ ¿¡·¯ ÆÄÀÏ suffix(ÀÓÀÇÁöÁ¤ °¡´É) |
listing | $listing | index ÆÄÀÏ ¹Ì ¼³Á¤½Ã object¸¦ ¸®½ºÆ®·Î º¸¿© ÁÙ °ÍÀÎÁö ¼³Á¤ |
css | $css | style sheet ÆÄÀÏ ÁöÁ¤ |
True
if successfully removed Definition at line 1395 of file cloudfiles-kt.php.
get_object | ( | $obj_name = NULL | ) |
Return an Object instance for the remote storage Object
Given a name, return a Object instance representing the remote storage object.
Example: ... authentication code excluded (see previous examples) ...
$conn = new CF_Connection($auth);
$public_container = $conn->get_container("public");
This call only fetches header information and not the content of the storage object. Use the Object's read() or stream() methods to obtain the object's data.
$pic = $public_container->get_object("baby.jpg");
string | $obj_name | name of storage Object |
Definition at line 941 of file cloudfiles-kt.php.
get_objects | ( | $limit = 0 , |
|
$marker = NULL , |
|||
$prefix = NULL , |
|||
$path = NULL , |
|||
$delimiter = NULL |
|||
) |
Return an array of Objects
Return an array of Object instances in this Container.
Example: ... authentication code excluded (see previous examples) ...
$images = $conn->get_container("my photos");
Grab the list of all storage objects
$all_objects = $images->get_objects();
Grab subsets of all storage objects
$first_ten = $images->get_objects(10);
Note the use of the previous result's last object name being used as the 'marker' parameter to fetch the next 10 objects
$next_ten = $images->list_objects(10, $first_ten[count($first_ten)-1]);
Grab images starting with "birthday_party" and default limit/marker to match all photos with that prefix
$prefixed = $images->get_objects(0, NULL, "birthday");
Assuming you have created the appropriate directory marker Objects, you can traverse your pseudo-hierarchical containers with the "path" argument.
$animals = $images->get_objects(0,NULL,NULL,"pictures/animals"); $dogs = $images->get_objects(0,NULL,NULL,"pictures/animals/dogs");
int | $limit | optional only return $limit names |
int | $marker | optional subset of names starting at $marker |
string | $prefix | optional Objects whose names begin with $prefix |
string | $path | optional only return results under "pathname" |
InvalidResponseException | unexpected response |
Definition at line 1046 of file cloudfiles-kt.php.
list_objects | ( | $limit = 0 , |
|
$marker = NULL , |
|||
$prefix = NULL , |
|||
$path = NULL |
|||
) |
Return a list of Objects
Return an array of strings listing the Object names in this Container.
Example: ... authentication code excluded (see previous examples) ...
$images = $conn->get_container("my photos");
Grab the list of all storage objects
$all_objects = $images->list_objects();
Grab subsets of all storage objects
$first_ten = $images->list_objects(10);
Note the use of the previous result's last object name being used as the 'marker' parameter to fetch the next 10 objects
$next_ten = $images->list_objects(10, $first_ten[count($first_ten)-1]);
Grab images starting with "birthday_party" and default limit/marker to match all photos with that prefix
$prefixed = $images->list_objects(0, NULL, "birthday");
Assuming you have created the appropriate directory marker Objects, you can traverse your pseudo-hierarchical containers with the "path" argument.
$animals = $images->list_objects(0,NULL,NULL,"pictures/animals"); $dogs = $images->list_objects(0,NULL,NULL,"pictures/animals/dogs");
int | $limit | optional only return $limit names |
int | $marker | optional subset of names starting at $marker |
string | $prefix | optional Objects whose names begin with $prefix |
string | $path | optional only return results under "pathname" |
InvalidResponseException | unexpected response |
Definition at line 990 of file cloudfiles-kt.php.
make_private | ( | ) |
ÇØ´ç ÄÁÅ×À̳ʸ¦ °ø°³ ¼³Á¤¸¦ Ãë¼ÒÇÑ´Ù.
Example: ... authentication code excluded (see previous examples) ...
$conn = new CF_Connection($auth);
$test_container = $conn->get_container("test");
Config specific container
$test_container->make_private();
True
if successfully removed Definition at line 1534 of file cloudfiles-kt.php.
make_public | ( | ) |
ÇØ´ç ÄÁÅ×À̳ʸ¦ °ø°³ ¼³Á¤ÇÑ´Ù. °ø°³ ¼³Á¤ ÇÒ °æ¿ì, ÀÎÁõ ¾øÀÌ ÄÁÅ×À̳ʿ¡ ÀÓÀÇÀÇ Á¢±Ù(ÀÐ±â ¹× Á¶È¸)ÀÌ °¡´ÉÇÏ´Ù. ¾²±â´Â ºÒ°¡´ÉÇÏ´Ù.
Example: ... authentication code excluded (see previous examples) ...
$conn = new CF_Connection($auth);
$test_container = $conn->get_container("test");
Config specific container
$test_container->make_public();
True
if successfully removed Definition at line 1510 of file cloudfiles-kt.php.
move_object_from | ( | $obj, | |
$container_source, | |||
$dest_obj_name = NULL , |
|||
$metadata = NULL , |
|||
$headers = NULL |
|||
) |
Move a remote storage Object from a source Container
Given an Object instance or name and a source Container instance or name, move copies the remote Object and all associated metadata and deletes the source Object afterwards
Example: ... authentication code excluded (see previous examples) ...
$conn = new CF_Connection($auth);
$images = $conn->get_container("my photos");
Move specific object
$images->move_object_from("disco_dancing.jpg","container_target");
obj | $obj | name or instance of Object to move |
obj | $container_source | name or instance of target Container |
string | $dest_obj_name | name of target object (optional - uses source name if omitted) |
array | $metadata | metadata array for new object (optional) |
array | $headers | header fields array for the new object (optional) |
true
if successfully moved SyntaxException | invalid Object/Container name |
NoSuchObjectException | remote Object does not exist |
InvalidResponseException | unexpected response |
Definition at line 1287 of file cloudfiles-kt.php.
move_object_to | ( | $obj, | |
$container_target, | |||
$dest_obj_name = NULL , |
|||
$metadata = NULL , |
|||
$headers = NULL |
|||
) |
Move a remote storage Object to a target Container
Given an Object instance or name and a target Container instance or name, move copies the remote Object and all associated metadata and deletes the source Object afterwards
Example: ... authentication code excluded (see previous examples) ...
$conn = new CF_Connection($auth);
$images = $conn->get_container("my photos");
Move specific object
$images->move_object_to("disco_dancing.jpg","container_target");
obj | $obj | name or instance of Object to move |
obj | $container_target | name or instance of target Container |
string | $dest_obj_name | name of target object (optional - uses source name if omitted) |
array | $metadata | metadata array for new object (optional) |
array | $headers | header fields array for the new object (optional) |
true
if successfully moved SyntaxException | invalid Object/Container name |
NoSuchObjectException | remote Object does not exist |
InvalidResponseException | unexpected response |
Definition at line 1247 of file cloudfiles-kt.php.
$bytes_used |
Definition at line 841 of file cloudfiles-kt.php.
$cfs_auth |
Definition at line 837 of file cloudfiles-kt.php.
$cfs_http |
Definition at line 838 of file cloudfiles-kt.php.
$metadata |
Definition at line 842 of file cloudfiles-kt.php.
$name |
Definition at line 839 of file cloudfiles-kt.php.
$object_count |
Definition at line 840 of file cloudfiles-kt.php.