コード例 #1
0
ファイル: Service.php プロジェクト: erikdukker/medisom
 /**
  * Create a container for this service.
  *
  * @param       $name     The name of the container
  * @param array $metadata Additional (optional) metadata to associate with the container
  * @return bool|static
  */
 public function createContainer($name, array $metadata = array())
 {
     $this->checkContainerName($name);
     $containerHeaders = Container::stockHeaders($metadata);
     $response = $this->getClient()->put($this->getUrl($name), $containerHeaders)->send();
     if ($response->getStatusCode() == 201) {
         return Container::fromResponse($response, $this);
     }
     return false;
 }