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

__toString() public method

Represent the path as a string.
public __toString ( )
    public function __toString()
    {
        $el = [];
        foreach ($this->path as $element) {
            $element = $element + ['id' => null, 'name' => null];
            $id = $element['id'] ? $element['id'] : $element['name'];
            $el[] = sprintf('[%s: %s]', $element['kind'], $id);
        }
        return sprintf('[ %s ]', implode(', ', $el));
    }