Google\Cloud\Datastore\DatastoreClient::allocateIds PHP Method

allocateIds() public method

Keys MUST be in an incomplete state (i.e. including a kind but not an ID or name in their final pathElement). This method will execute a service request. Example: $keys = [ $datastore->key('Person'), $datastore->key('Person') ]; $keysWithAllocatedIds = $datastore->allocateIds($keys);
See also: https://cloud.google.com/datastore/reference/rest/v1/projects/allocateIds allocateIds
public allocateIds ( array $keys, array $options = [] ) : Key[]
$keys array The incomplete keys.
$options array [optional] Configuration options.
return Key[]
    public function allocateIds(array $keys, array $options = [])
    {
        return $this->operation->allocateIds($keys, $options);
    }