Folks_Friends:: defines an API for implementing storage backends for
Friends.
Copyright Obala d.o.o. (www.obala.si)
See the enclosed file COPYING for license information (GPL). If you
did not receive this file, see http://www.horde.org/licenses/gpl.
Methods summary
public static
|
#
singleton( string $driver = null, array $params = null )
Singleton for driver object
Singleton for driver object
Parameters
- $driver
- <p>$friends The type of the concrete Folks_Friends subclass
to return. The class name is based on the
storage Friends ($friends). The code is
dynamically included.</p>
- $params
- <p>A hash containing any additional configuration
or connection parameters a subclass might need.</p>
|
public
boolean
|
#
hasCapability( string $capability )
Queries the current object to find out if it supports the given
capability.
Queries the current object to find out if it supports the given
capability.
Parameters
- $capability
- The capability to test for.
Returns
boolean Whether or not the capability is supported.
|
public
boolean
|
#
needsApproval( string $user )
Check if a users requies his approval to be added as a friend
Check if a users requies his approval to be added as a friend
Parameters
Returns
boolean
|
public
boolean
|
#
sendNotification( string $user, string $title, string $body )
Send user a nofication or approve request
Send user a nofication or approve request
Parameters
- $user
- Usersame
- $title
- Title of notification
- $body
- Content of notification
Returns
boolean
|
public
array
|
#
getBlacklist( )
Get user blacklist
Returns
array of users blacklist
|
public
|
#
addBlacklisted( string $user )
Add user to a blacklist list
Add user to a blacklist list
Parameters
|
public
|
#
removeBlacklisted( string $user )
Remove user from blacklist list
Remove user from blacklist list
Parameters
|
public
boolean
|
#
isBlacklisted( string $user )
Check if user is on blacklist
Check if user is on blacklist
Parameters
Returns
boolean
|
public
|
#
addFriend( string $friend, string $group = null )
Add user to a friend list
Add user to a friend list
Parameters
- $friend
- Friend's usersame
- $group
- Group to add friend to
|
public
|
#
removeFriend( string $friend, string $group = null )
Remove user from a fiend list
Remove user from a fiend list
Parameters
- $friend
- Friend's usersame
- $group
- Group to remove friend from
|
public
array
|
#
getFriends( string $group = null )
Get user friends
Parameters
Returns
array of users (in group)
|
public
|
#
waitingApprovalFrom( )
Get friends that does not confirm the current user yet
Get friends that does not confirm the current user yet
|
public
|
#
waitingApprovalFor( )
User that we do not confirm them user yet
User that we do not confirm them user yet
|
public
|
#
approveFriend( string $friend )
Approve our friend to add us to his userlist
Approve our friend to add us to his userlist
Parameters
|
public
boolean
|
#
isFriend( string $user )
Check if user is on blacklist
Check if user is on blacklist
Parameters
Returns
boolean
|
public
array
|
#
getPossibleFriends( integer $limit = 0 )
Return all friends of out frends
and make a top list of common users
Return all friends of out frends
and make a top list of common users
Parameters
Returns
array users
|
public
array
|
#
friendOf( )
Get users who have us on their friendlist
Get users who have us on their friendlist
Returns
array users
|
public
|
|
public
|
|