original_string: public static function putBucket($bucket, $acl = self::ACL_PRIVATE, $location = false)
  	{
  		$rest = new S3Request('PUT', $bucket, '', self::$endpoint);
  		$rest->setAmzHeader('x-amz-acl', $acl);
  
  		if ($location !== false)
  		{
  			$dom = new DOMDocument;
  			$createBucketConfiguration = $dom->createElement('CreateBucketConfiguration');
  			$locationConstraint = $dom->createElement('LocationConstraint', $location);
  			$createBucketConfiguration->appendChild($locationConstraint);
  			$dom->appendChild($createBucketConfiguration);
  			$rest->data = $dom->saveXML();
  			$rest->size = strlen($rest->data);
  			$rest->setHeader('Content-Type', 'application/xml');
  		}
  		$rest = $rest->getResponse();
  
  		if ($rest->error === false && $rest->code !== 200)
  			$rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status');
  		if ($rest->error !== false)
  		{
  			self::__triggerError(sprintf("S3::putBucket({$bucket}, {$acl}, {$location}): [%s] %s",
  			$rest->error['code'], $rest->error['message']), __FILE__, __LINE__);
  			return false;
  		}
  		return true;
  	}
code: public static function putBucket($bucket, $acl = self::ACL_PRIVATE, $location = false)
  	{
  		$rest = new S3Request('PUT', $bucket, '', self::$endpoint);
  		$rest->setAmzHeader('x-amz-acl', $acl);
  
  		if ($location !== false)
  		{
  			$dom = new DOMDocument;
  			$createBucketConfiguration = $dom->createElement('CreateBucketConfiguration');
  			$locationConstraint = $dom->createElement('LocationConstraint', $location);
  			$createBucketConfiguration->appendChild($locationConstraint);
  			$dom->appendChild($createBucketConfiguration);
  			$rest->data = $dom->saveXML();
  			$rest->size = strlen($rest->data);
  			$rest->setHeader('Content-Type', 'application/xml');
  		}
  		$rest = $rest->getResponse();
  
  		if ($rest->error === false && $rest->code !== 200)
  			$rest->error = array('code' => $rest->code, 'message' => 'Unexpected HTTP status');
  		if ($rest->error !== false)
  		{
  			self::__triggerError(sprintf("S3::putBucket({$bucket}, {$acl}, {$location}): [%s] %s",
  			$rest->error['code'], $rest->error['message']), __FILE__, __LINE__);
  			return false;
  		}
  		return true;
  	}
code_tokens: public static function putBucket ( $ bucket , $ acl = self :: ACL_PRIVATE , $ location = false ) { $ rest = new S3Request ( 'PUT' , $ bucket , '' , self :: $ endpoint ) ; $ rest -> setAmzHeader ( 'x-amz-acl' , $ acl ) ; if ( $ location !== false ) { $ dom = new DOMDocument ; $ createBucketConfiguration = $ dom -> createElement ( 'CreateBucketConfiguration' ) ; $ locationConstraint = $ dom -> createElement ( 'LocationConstraint' , $ location ) ; $ createBucketConfiguration -> appendChild ( $ locationConstraint ) ; $ dom -> appendChild ( $ createBucketConfiguration ) ; $ rest -> data = $ dom -> saveXML ( ) ; $ rest -> size = strlen ( $ rest -> data ) ; $ rest -> setHeader ( 'Content-Type' , 'application/xml' ) ; } $ rest = $ rest -> getResponse ( ) ; if ( $ rest -> error === false && $ rest -> code !== 200 ) $ rest -> error = array ( 'code' => $ rest -> code , 'message' => 'Unexpected HTTP status' ) ; if ( $ rest -> error !== false ) { self :: __triggerError ( sprintf ( "S3::putBucket({$bucket}, {$acl}, {$location}): [%s] %s" , $ rest -> error [ 'code' ] , $ rest -> error [ 'message' ] ) , __FILE__ , __LINE__ ) ; return false ; } return true ; }
docstring: Put a bucket
  
  @param string $bucket Bucket name
  @param constant $acl ACL flag
  @param string $location Set as "EU" to create buckets hosted in Europe
  @return boolean
docstring_tokens: Put a bucket