Google\Cloud\Datastore\Key::jsonSerialize PHP Method

jsonSerialize() public method

public jsonSerialize ( )
    public function jsonSerialize()
    {
        return $this->keyObject();
    }

Usage Example

コード例 #1
0
ファイル: KeyTest.php プロジェクト: Radiergummi/anacronism
 public function testJsonSerialize()
 {
     $key = new Key('foo');
     $key->pathElement('Robots', '1000', Key::TYPE_NAME);
     $this->assertEquals($key->jsonSerialize(), $key->keyObject());
 }