ktamas77/firebase-php

Delete Array of References

marcoas opened this issue · 1 comments

(Translated by Google)

I think it would be useful, to be able to establish an Array of references, to the method DELETE, to be able to eliminate many places, with a single call

$info = '/path/to/delete'
$firebase->delete( $info )

or

$info[] = '/path/to/delete/1'
$info[] = '/path/to/delete/2'
$firebase->delete( $info )

I was trying to keep the implementation as simple as possible to support the basic functions of firebase. Your request could be easily implemented this way:

foreach ($info as $item) {
    $firebase->delete($item);
}

you can also easily extend the current Firebase class and add helper functions for this specific use case.