Properties

$_params

$_params : array

Hash containing connection parameters.

Type

array

$_user

$_user : string

String containing user

Type

string

$_cache

$_cache : \Horde_Cache

String cache reference

Type

\Horde_Cache

$instances

$instances : 

Friends instances

Type

Methods

singleton()

singleton(  $driver = null, array  $params = null) 

Singleton for driver object

Parameters

$driver
array $params

A hash containing any additional configuration or connection parameters a subclass might need.

hasCapability()

hasCapability(string  $capability) : boolean

Queries the current object to find out if it supports the given capability.

Parameters

string $capability

The capability to test for.

Returns

boolean —

Whether or not the capability is supported.

needsApproval()

needsApproval(string  $user) : boolean

Check if a users requies his approval to be added as a friend

Parameters

string $user

Usersame

Returns

boolean

sendNotification()

sendNotification(string  $user, string  $title, string  $body) : boolean

Send user a nofication or approve request

Parameters

string $user

Usersame

string $title

Title of notification

string $body

Content of notification

Returns

boolean

getBlacklist()

getBlacklist() : array

Get user blacklist

Returns

array —

of users blacklist

addBlacklisted()

addBlacklisted(string  $user) 

Add user to a blacklist list

Parameters

string $user

Usersame

removeBlacklisted()

removeBlacklisted(string  $user) 

Add user to a blacklist list

Parameters

string $user

Usersame

isBlacklisted()

isBlacklisted(string  $user) : boolean

Check if user is on blacklist

Parameters

string $user

User to check

Returns

boolean

addFriend()

addFriend(string  $friend, string  $group = null) 

Add user to a friend list

Parameters

string $friend

Friend's usersame

string $group

Group to add friend to

removeFriend()

removeFriend(string  $friend) 

Remove user from a fiend list

Parameters

string $friend

Friend's usersame

getFriends()

getFriends() : array

Get user friends

Returns

array —

of users

waitingApprovalFrom()

waitingApprovalFrom() 

Get friends that does not confirm the current user yet

waitingApprovalFor()

waitingApprovalFor() 

User that we do not confirm them user yet

approveFriend()

approveFriend(string  $friend) 

Approve our friend to add us to his userlist

Parameters

string $friend

Friend username

isFriend()

isFriend(string  $user) : boolean

Check if user is on blacklist

Parameters

string $user

User to check

Returns

boolean

getPossibleFriends()

getPossibleFriends(integer  $limit) : array

Return all friends of out frends and make a top list of common users

Parameters

integer $limit

Users

Returns

array —

users

friendOf()

friendOf() : array

Get users who have us on their friendlist

Returns

array —

users

getGroupOwner()

getGroupOwner(  $group) 

Get user owning group

Parameters

$group

getGroups()

getGroups() 

Get user groups

__construct()

__construct(array  $params) 

Construct object

Parameters

array $params

A hash containing any additional configuration or connection parameters a subclass might need.

_approveFriend()

_approveFriend(string  $friend) 

Approve our friend to add us to his userlist

Parameters

string $friend

Friedn username

_addFriend()

_addFriend(string  $friend) 

Add user to a friend list

Parameters

string $friend

Friend's usersame

_addBlacklisted()

_addBlacklisted(string  $user) 

Add user to a blacklist list

Parameters

string $user

Usersame

_getGroups()

_getGroups() 

Get avaiable groups

factory()

factory(  $driver = null, array  $params = null) : \Folks_Friends

Attempts to return a concrete Folks_Friends instance based on $friends.

Parameters

$driver
array $params

A hash containing any additional configuration or connection parameters a subclass might need.

Returns

\Folks_Friends

The newly created concrete Folks_Friends instance, or false on an error.

_getAdmins()

_getAdmins() 

Get administartor usernames