public function getSnapshot( $id ) {
		try {
			$result = $this->client->getItem(
				[
					'ConsistentRead' => true,
					'TableName'      => 'wpsnapshots-' . $this->repository,
					'Key'            => [
						'id' => [
							'S' => $id,
						],
					],
				]
			);
		} catch ( \Exception $e ) {
			if ( 'AccessDeniedException' === $e->getAwsErrorCode() ) {
				Log::instance()->write( 'Access denied. You might not have access to this snapshot.', 0, 'error' );
			}

			Log::instance()->write( 'Error Message: ' . $e->getMessage(), 1, 'error' );
			Log::instance()->write( 'AWS Request ID: ' . $e->getAwsRequestId(), 1, 'error' );
			Log::instance()->write( 'AWS Error Type: ' . $e->getAwsErrorType(), 1, 'error' );
			Log::instance()->write( 'AWS Error Code: ' . $e->getAwsErrorCode(), 1, 'error' );

			return false;
		}

		if ( empty( $result['Item'] ) ) {
			return false;
		}

		if ( ! empty( $result['Item']['error'] ) ) {
			return false;
		}

		$marshaler = new Marshaler();

		return $marshaler->unmarshalItem( $result['Item'] );
	}
public function getSnapshot( $id ) {
		try {
			$result = $this->client->getItem(
				[
					'ConsistentRead' => true,
					'TableName'      => 'wpsnapshots-' . $this->repository,
					'Key'            => [
						'id' => [
							'S' => $id,
						],
					],
				]
			);
		} catch ( \Exception $e ) {
			if ( 'AccessDeniedException' === $e->getAwsErrorCode() ) {
				Log::instance()->write( 'Access denied. You might not have access to this snapshot.', 0, 'error' );
			}

			Log::instance()->write( 'Error Message: ' . $e->getMessage(), 1, 'error' );
			Log::instance()->write( 'AWS Request ID: ' . $e->getAwsRequestId(), 1, 'error' );
			Log::instance()->write( 'AWS Error Type: ' . $e->getAwsErrorType(), 1, 'error' );
			Log::instance()->write( 'AWS Error Code: ' . $e->getAwsErrorCode(), 1, 'error' );

			return false;
		}

		if ( empty( $result['Item'] ) ) {
			return false;
		}

		if ( ! empty( $result['Item']['error'] ) ) {
			return false;
		}

		$marshaler = new Marshaler();

		return $marshaler->unmarshalItem( $result['Item'] );
	}
public function getSnapshot ( $ id ) { try { $ result = $ this -> client -> getItem ( [ 'ConsistentRead' => true , 'TableName' => 'wpsnapshots-' . $ this -> repository , 'Key' => [ 'id' => [ 'S' => $ id , ] , ] , ] ) ; } catch ( \ Exception $ e ) { if ( 'AccessDeniedException' === $ e -> getAwsErrorCode ( ) ) { Log :: instance ( ) -> write ( 'Access denied. You might not have access to this snapshot.' , 0 , 'error' ) ; } Log :: instance ( ) -> write ( 'Error Message: ' . $ e -> getMessage ( ) , 1 , 'error' ) ; Log :: instance ( ) -> write ( 'AWS Request ID: ' . $ e -> getAwsRequestId ( ) , 1 , 'error' ) ; Log :: instance ( ) -> write ( 'AWS Error Type: ' . $ e -> getAwsErrorType ( ) , 1 , 'error' ) ; Log :: instance ( ) -> write ( 'AWS Error Code: ' . $ e -> getAwsErrorCode ( ) , 1 , 'error' ) ; return false ; } if ( empty ( $ result [ 'Item' ] ) ) { return false ; } if ( ! empty ( $ result [ 'Item' ] [ 'error' ] ) ) { return false ; } $ marshaler = new Marshaler ( ) ; return $ marshaler -> unmarshalItem ( $ result [ 'Item' ] ) ; }
Get a snapshot given an id

@param  string $id Snapshot ID
@return bool
Get a snapshot given an id