Folks_Notification_tickets
        
        extends Folks_Notification
    
    
            
            in package
            
        
    
    
    
        
            Folks Notification Class.
Copyright Obala d.o.o. (www.obala.si)
See the enclosed file LICENSE for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.
Tags
Table of Contents
- $_params : mixed
- Driver parameters
- $instances : mixed
- Instances
- __construct() : mixed
- Constructor
- getAdmins() : array<string|int, mixed>
- Get current scope admins
- getMethods() : true
- Returns all avaiable methods
- getName() : mixed
- Returns method human name
- isAvailable() : bool
- Checks if a driver is available for a certain notification type
- notify() : true
- Notify user
- notifyAdmins() : true
- Notify user in all available drivers
- notifyAll() : true
- Notify user in all available drivers
- notifyAllFriends() : true
- Notify user's friends in all available drivers
- singleton() : mixed
- Singleton for driver object
- _getUserFromAddr() : string
- Try to get read user from address
- factory() : Folks_Notification
- Attempts to return a concrete Folks_Notification instance based on $driver.
Properties
$_params
Driver parameters
    protected
        mixed
    $_params
    
    
        
    
$instances
Instances
    private
    static    mixed
    $instances
     = array()
    
        
    
Methods
__construct()
Constructor
    public
                __construct([array<string|int, mixed> $params = array() ]) : mixed
    
        Parameters
- $params : array<string|int, mixed> = array()
- 
                    A hash containing any additional configuration or connection parameters a subclass might need. 
Return values
mixed —getAdmins()
Get current scope admins
    public
                getAdmins() : array<string|int, mixed>
    
    
    
        Return values
array<string|int, mixed> —of user with delete permission in "scope:admin" permission
getMethods()
Returns all avaiable methods
    public
                getMethods([string $type = 'user' ]) : true
    
        Parameters
- $type : string = 'user'
- 
                    Type of notification to check 
Return values
true —on succes, PEAR_Error on failure
getName()
Returns method human name
    public
                getName() : mixed
    
    
    
        Return values
mixed —isAvailable()
Checks if a driver is available for a certain notification type
    public
                isAvailable(string $type) : bool
    
        Parameters
- $type : string
- 
                    Notification type 
Return values
bool —notify()
Notify user
    public
                notify(mixed $user, string $subject, string $body[, array<string|int, mixed> $attachments = array() ]) : true
    
        Parameters
- $user : mixed
- 
                    User or array of users to send notification to 
- $subject : string
- 
                    Subject of message 
- $body : string
- 
                    Body of message 
- $attachments : array<string|int, mixed> = array()
- 
                    Attached files 
Return values
true —on succes, PEAR_Error on failure
notifyAdmins()
Notify user in all available drivers
    public
                notifyAdmins(string $subject, string $body[, array<string|int, mixed> $attachments = array() ]) : true
    
        Parameters
- $subject : string
- 
                    Subject of message 
- $body : string
- 
                    Body of message 
- $attachments : array<string|int, mixed> = array()
- 
                    Attached files 
Return values
true —on succes, PEAR_Error on failure
notifyAll()
Notify user in all available drivers
    public
                notifyAll(string $subject, string $body[, array<string|int, mixed> $attachments = array() ][, mixed $user = null ]) : true
    
        Parameters
- $subject : string
- 
                    Subject of message 
- $body : string
- 
                    Body of message 
- $attachments : array<string|int, mixed> = array()
- 
                    Attached files 
- $user : mixed = null
- 
                    User or array of users to send notification to 
Return values
true —on succes, PEAR_Error on failure
notifyAllFriends()
Notify user's friends in all available drivers
    public
                notifyAllFriends(string $subject, string $body[, array<string|int, mixed> $attachments = array() ][, string $user = null ]) : true
    
        Parameters
- $subject : string
- 
                    Subject of message 
- $body : string
- 
                    Body of message 
- $attachments : array<string|int, mixed> = array()
- 
                    Attached files 
- $user : string = null
- 
                    User to send notifications to 
Return values
true —on succes, PEAR_Error on failure
singleton()
Singleton for driver object
    public
            static    singleton(string $driver[, array<string|int, mixed> $params = null ]) : mixed
    
        Parameters
- $driver : string
- 
                    The type of the concrete Folks_Notification subclass to return. The class name is based on the storage Notification ($driver). The code is dynamically included. 
- $params : array<string|int, mixed> = null
- 
                    A hash containing any additional configuration or connection parameters a subclass might need. 
Return values
mixed —_getUserFromAddr()
Try to get read user from address
    protected
                _getUserFromAddr(string $user) : string
    
        Parameters
- $user : string
- 
                    Username 
Return values
string —User email
factory()
Attempts to return a concrete Folks_Notification instance based on $driver.
    protected
            static    factory(string $driver[, array<string|int, mixed> $params = null ]) : Folks_Notification
    
        Parameters
- $driver : string
- 
                    The type of the concrete Folks_Notification subclass to return. The class name is based on the storage driver ($driver). The code is dynamically included. 
- $params : array<string|int, mixed> = null
- 
                    A hash containing any additional configuration or connection parameters a subclass might need. 
Return values
Folks_Notification —The newly created concrete Folks_Notification instance, or false on an error.