PHP Class Folks_Friends_sql, horde

Copyright 2007-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.
Author: Duck ([email protected])
Inheritance: extends Folks_Friends
Show file Open project: horde/horde

Public Methods

Method Description
friendOf ( ) : array Get users who have you on friendlist
waitingApprovalFor ( ) Get friends that does not confirm the current user yet
waitingApprovalFrom ( ) Get friends that does not confirm the current user yet

Protected Methods

Method Description
__construct ( array $params = [] ) Constructs a new SQL storage object.
_addBlacklisted ( string $user ) Add user to a blacklist list
_addFriend ( string $friend ) Add user to a friend list
_approveFriend ( string $friend ) Approve our friend to add us to his userlist
_connect ( ) : boolean Attempts to open a persistent connection to the SQL server.
_getBlacklist ( ) : array Get user blacklist
_getFriends ( ) : array Get user friends
_getGroups ( ) Get user groups
_removeBlacklisted ( string $user ) Remove user from blacklist list
_removeFriend ( string $friend ) Remove user from a fiend list

Method Details

__construct() protected method

Constructs a new SQL storage object.
protected __construct ( array $params = [] )
$params array A hash containing connection parameters.

_addBlacklisted() protected method

Add user to a blacklist list
protected _addBlacklisted ( string $user )
$user string Usersame

_addFriend() protected method

Add user to a friend list
protected _addFriend ( string $friend )
$friend string Friend's usersame

_approveFriend() protected method

Approve our friend to add us to his userlist
protected _approveFriend ( string $friend )
$friend string Friedn username

_connect() protected method

Attempts to open a persistent connection to the SQL server.
protected _connect ( ) : boolean
return boolean True on success.

_getBlacklist() protected method

Get user blacklist
protected _getBlacklist ( ) : array
return array of users blacklist

_getFriends() protected method

Get user friends
protected _getFriends ( ) : array
return array of user's friends

_getGroups() protected method

Get user groups
protected _getGroups ( )

_removeBlacklisted() protected method

Remove user from blacklist list
protected _removeBlacklisted ( string $user )
$user string Usersame

_removeFriend() protected method

Remove user from a fiend list
protected _removeFriend ( string $friend )
$friend string Friend's usersame

friendOf() public method

Get users who have you on friendlist
public friendOf ( ) : array
return array users

waitingApprovalFor() public method

Get friends that does not confirm the current user yet
public waitingApprovalFor ( )

waitingApprovalFrom() public method

Get friends that does not confirm the current user yet
public waitingApprovalFrom ( )