original_string: public static function getBucketLogging($bucket)
  	{
  		$rest = new S3Request('GET', $bucket, '', self::$endpoint);
  		$rest->setParameter('logging', null);
  		$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::getBucketLogging({$bucket}): [%s] %s",
  			$rest->error['code'], $rest->error['message']), __FILE__, __LINE__);
  			return false;
  		}
  		if (!isset($rest->body->LoggingEnabled)) return false; // No logging
  		return array(
  			'targetBucket' => (string)$rest->body->LoggingEnabled->TargetBucket,
  			'targetPrefix' => (string)$rest->body->LoggingEnabled->TargetPrefix,
  		);
  	}
code: public static function getBucketLogging($bucket)
  	{
  		$rest = new S3Request('GET', $bucket, '', self::$endpoint);
  		$rest->setParameter('logging', null);
  		$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::getBucketLogging({$bucket}): [%s] %s",
  			$rest->error['code'], $rest->error['message']), __FILE__, __LINE__);
  			return false;
  		}
  		if (!isset($rest->body->LoggingEnabled)) return false; // No logging
  		return array(
  			'targetBucket' => (string)$rest->body->LoggingEnabled->TargetBucket,
  			'targetPrefix' => (string)$rest->body->LoggingEnabled->TargetPrefix,
  		);
  	}
code_tokens: public static function getBucketLogging ( $ bucket ) { $ rest = new S3Request ( 'GET' , $ bucket , '' , self :: $ endpoint ) ; $ rest -> setParameter ( 'logging' , null ) ; $ 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::getBucketLogging({$bucket}): [%s] %s" , $ rest -> error [ 'code' ] , $ rest -> error [ 'message' ] ) , __FILE__ , __LINE__ ) ; return false ; } if ( ! isset ( $ rest -> body -> LoggingEnabled ) ) return false ; // No logging return array ( 'targetBucket' => ( string ) $ rest -> body -> LoggingEnabled -> TargetBucket , 'targetPrefix' => ( string ) $ rest -> body -> LoggingEnabled -> TargetPrefix , ) ; }
docstring: Get logging status for a bucket
  
  This will return false if logging is not enabled.
  Note: To enable logging, you also need to grant write access to the log group
  
  @param string $bucket Bucket name
  @return array | false
docstring_tokens: Get logging status for a bucket