/** * Store an item in the storage service. * * @param string $destinationPath * @param mixed $data * @param array $options * @return void */ public function storeItem($destinationPath, $data, $options = null) { $this->rackspace->storeObject($this->container, $destinationPath, $data, $options); if (!$this->rackspace->isSuccessful()) { throw new Exception\RuntimeException('Error on store: ' . $this->rackspace->getErrorMsg()); } }
public function testStoreObject() { $content= 'This is a test!'; $result= $this->rackspace->storeObject(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME, TESTS_ZEND_SERVICE_RACKSPACE_OBJECT_NAME, $content, $this->metadata); $this->assertTrue($result); }
/** * Add an object in the container * * @param string $name * @param string $file the content of the object * @param array $metadata * @return boolen */ public function addObject($name, $file, $metadata = array()) { return $this->service->storeObject($this->getName(), $name, $file, $metadata); }