Google\Cloud\BigQuery\Bytes::formatAsString PHP Method

formatAsString() public method

Format the value as a string.
public formatAsString ( ) : string
return string
    public function formatAsString()
    {
        return base64_encode((string) $this->value);
    }

Usage Example

コード例 #1
0
 public function testToString()
 {
     $bytes = new Bytes($this->value);
     $expected = base64_encode($this->value);
     $this->assertEquals($expected, (string) $bytes);
     $this->assertEquals($expected, $bytes->formatAsString());
 }