Google\Cloud\Datastore\Key::__toString PHP Méthode

__toString() public méthode

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));
    }