Storage/src/Bucket.php
public function notifications(array $options = [])
    {
        $resultLimit = $this->pluck('resultLimit', $options, false);

        return new ItemIterator(
            new PageIterator(
                function (array $notification) {
                    return new Notification(
                        $this->connection,
                        $notification['id'],
                        $this->identity['bucket'],
                        $notification + [
                            'requesterProjectId' => $this->identity['userProject']
                        ]
                    );
                },
                [$this->connection, 'listNotifications'],
                $options + $this->identity,
                ['resultLimit' => $resultLimit]
            )
        );
    }
public function notifications(array $options = [])
    {
        $resultLimit = $this->pluck('resultLimit', $options, false);

        return new ItemIterator(
            new PageIterator(
                function (array $notification) {
                    return new Notification(
                        $this->connection,
                        $notification['id'],
                        $this->identity['bucket'],
                        $notification + [
                            'requesterProjectId' => $this->identity['userProject']
                        ]
                    );
                },
                [$this->connection, 'listNotifications'],
                $options + $this->identity,
                ['resultLimit' => $resultLimit]
            )
        );
    }
public function notifications ( array $ options = [ ] ) { $ resultLimit = $ this -> pluck ( 'resultLimit' , $ options , false ) ; return new ItemIterator ( new PageIterator ( function ( array $ notification ) { return new Notification ( $ this -> connection , $ notification [ 'id' ] , $ this -> identity [ 'bucket' ] , $ notification + [ 'requesterProjectId' => $ this -> identity [ 'userProject' ] ] ) ; } , [ $ this -> connection , 'listNotifications' ] , $ options + $ this -> identity , [ 'resultLimit' => $ resultLimit ] ) ) ; }
Fetches all notifications associated with this bucket.

Example:
```
$notifications = $bucket->notifications();

foreach ($notifications as $notification) {
echo $notification->id() . PHP_EOL;
}
```

@codingStandardsIgnoreStart
@see https://cloud.google.com/storage/docs/json_api/v1/notifications/list Notifications list API documentation.
@codingStandardsIgnoreEnd

@param array $options [optional] {
Configuration options.

@type int $resultLimit Limit the number of results returned in total.
**Defaults to** `0` (return all results).
}
@return ItemIterator<Notification>
@experimental The experimental flag means that while we believe this
method or class is ready for use, it may change before release in
backwards-incompatible ways. Please use with caution, and test
thoroughly when upgrading.
Fetches all notifications associated with this bucket .