[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/inc/Subscriptions/ -> SubscriberManager.php (summary)

(no description)

File Size: 290 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

SubscriberManager:: (7 methods):
  isenabled()
  add()
  remove()
  userSubscription()
  subscribers()
  notifyAddresses()
  file()


Class: SubscriberManager  - X-Ref

isenabled()   X-Ref
Check if subscription system is enabled

return: bool

add($id, $user, $style, $data = '')   X-Ref
Adds a new subscription for the given page or namespace

This will automatically overwrite any existent subscription for the given user on this
*exact* page or namespace. It will *not* modify any subscription that may exist in higher namespaces.

return: bool
param: string $id The target page or namespace, specified by id; Namespaces
param: string $user
param: string $style
param: string $data

remove($id, $user = null, $style = null, $data = null)   X-Ref
Removes a subscription for the given page or namespace

This removes all subscriptions matching the given criteria on the given page or
namespace. It will *not* modify any subscriptions that may exist in higher
namespaces.

return: bool
param: string       $id The target object’s (namespace or page) id
param: string|array $user
param: string|array $style
param: string|array $data

userSubscription($id = '', $user = '')   X-Ref
Get data for $INFO['subscribed']

$INFO['subscribed'] is either false if no subscription for the current page
and user is in effect. Else it contains an array of arrays with the fields
“target”, “style”, and optionally “data”.

author: Adrian Lang <lang@cosmocode.de>
return: array|false
param: string $id   Page ID, defaults to global $ID
param: string $user User, defaults to $_SERVER['REMOTE_USER']

subscribers($page, $user = null, $style = null, $data = null)   X-Ref
Recursively search for matching subscriptions

This function searches all relevant subscription files for a page or
namespace.

author: Adrian Lang <lang@cosmocode.de>
return: array
param: string       $page The target object’s (namespace or page) id
param: string|array $user
param: string|array $style
param: string|array $data

notifyAddresses(&$data)   X-Ref
Default callback for COMMON_NOTIFY_ADDRESSLIST

Aggregates all email addresses of user who have subscribed the given page with 'every' style

author: Adrian Lang <lang@cosmocode.de>
author: Steven Danz <steven-danz@kc.rr.com>
param: array &$data Containing the entries:

file($id)   X-Ref
Return the subscription meta file for the given ID

author: Adrian Lang <lang@cosmocode.de>
return: string
param: string $id The target page or namespace, specified by id; Namespaces