Documentation

Folks_Friends_facebook extends Folks_Friends
in package

Folks facebook firends implementation

Copyright 2007-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (GPL). If you did not receive this file, see http://www.horde.org/licenses/gpl.

Tags
author

Duck duck@obala.net

Table of Contents

$_cache  : Horde_Cache
String cache reference
$_params  : array<string|int, mixed>
Hash containing connection parameters.
$_user  : string
String containing user
$_facebook  : mixed
FB connection parameters
$_sid  : mixed
$_uid  : mixed
$instances  : mixed
Friends instances
addBlacklisted()  : mixed
Add user to a blacklist list
addFriend()  : mixed
Add user to a friend list
approveFriend()  : mixed
Approve our friend to add us to his userlist
friendOf()  : array<string|int, mixed>
Get users who have us on their friendlist
getBlacklist()  : array<string|int, mixed>
Get user blacklist
getFriends()  : array<string|int, mixed>
Get user friends
getGroupOwner()  : mixed
Get user owning group
getGroups()  : mixed
Get avaiable groups
getPossibleFriends()  : array<string|int, mixed>
Return all friends of out frends and make a top list of common users
hasCapability()  : bool
Queries the current object to find out if it supports the given capability.
isBlacklisted()  : bool
Check if user is on blacklist
isFriend()  : bool
Check if user is on blacklist
needsApproval()  : bool
Check if a users requies his approval to be added as a friend
removeBlacklisted()  : mixed
Remove user from blacklist list
removeFriend()  : mixed
Remove user from a fiend list
sendNotification()  : bool
Send user a nofication or approve request
singleton()  : mixed
Singleton for driver object
waitingApprovalFor()  : mixed
User that we do not confirm them user yet
waitingApprovalFrom()  : mixed
Get friends that does not confirm the current user yet
__construct()  : mixed
Construct object
_approveFriend()  : mixed
Approve our friend to add us to his userlist
_getFriends()  : array<string|int, mixed>
Get user friends
_getAdmins()  : mixed
Get administartor usernames
_loadFB()  : mixed
Load FB content
factory()  : Folks_Friends
Attempts to return a concrete Folks_Friends instance based on $friends.

Properties

$_cache

String cache reference

protected Horde_Cache $_cache

$_params

Hash containing connection parameters.

protected array<string|int, mixed> $_params = array()

$_user

String containing user

protected string $_user

$_facebook

FB connection parameters

private mixed $_facebook

$instances

Friends instances

private static mixed $instances = array()

Methods

addBlacklisted()

Add user to a blacklist list

public addBlacklisted(string $user) : mixed
Parameters
$user : string

Usersame

Return values
mixed

addFriend()

Add user to a friend list

public addFriend(string $friend[, string $group = null ]) : mixed
Parameters
$friend : string

Friend's usersame

$group : string = null

Group to add friend to

Return values
mixed

approveFriend()

Approve our friend to add us to his userlist

public approveFriend(string $friend) : mixed
Parameters
$friend : string

Friend username

Return values
mixed

friendOf()

Get users who have us on their friendlist

public friendOf() : array<string|int, mixed>
Return values
array<string|int, mixed>

users

getBlacklist()

Get user blacklist

public getBlacklist() : array<string|int, mixed>
Return values
array<string|int, mixed>

of users blacklist

getFriends()

Get user friends

public getFriends([string $group = null ]) : array<string|int, mixed>
Parameters
$group : string = null

Get friens only from this group

Return values
array<string|int, mixed>

of users (in group)

getGroupOwner()

Get user owning group

public getGroupOwner(mixed $group) : mixed
Parameters
$group : mixed
Return values
mixed

getGroups()

Get avaiable groups

public getGroups() : mixed
Return values
mixed

getPossibleFriends()

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

public getPossibleFriends(int $limit) : array<string|int, mixed>
Parameters
$limit : int

Users

Return values
array<string|int, mixed>

users

hasCapability()

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

public hasCapability(string $capability) : bool
Parameters
$capability : string

The capability to test for.

Return values
bool

Whether or not the capability is supported.

isBlacklisted()

Check if user is on blacklist

public isBlacklisted(string $user) : bool
Parameters
$user : string

User to check

Return values
bool

isFriend()

Check if user is on blacklist

public isFriend(string $user) : bool
Parameters
$user : string

User to check

Return values
bool

needsApproval()

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

public needsApproval(string $user) : bool
Parameters
$user : string

Usersame

Return values
bool

removeBlacklisted()

Remove user from blacklist list

public removeBlacklisted(string $user) : mixed
Parameters
$user : string

Usersame

Return values
mixed

removeFriend()

Remove user from a fiend list

public removeFriend(string $friend[, string $group = null ]) : mixed
Parameters
$friend : string

Friend's usersame

$group : string = null

Group to remove friend from

Return values
mixed

sendNotification()

Send user a nofication or approve request

public sendNotification(string $user, string $title, string $body) : bool
Parameters
$user : string

Usersame

$title : string

Title of notification

$body : string

Content of notification

Return values
bool

singleton()

Singleton for driver object

public static singleton([mixed $driver = null ][, array<string|int, mixed> $params = null ]) : mixed
Parameters
$driver : mixed = null
$params : array<string|int, mixed> = null

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

Return values
mixed

waitingApprovalFor()

User that we do not confirm them user yet

public waitingApprovalFor() : mixed
Return values
mixed

waitingApprovalFrom()

Get friends that does not confirm the current user yet

public waitingApprovalFrom() : mixed
Return values
mixed

__construct()

Construct object

protected __construct(array<string|int, mixed> $params) : mixed
Parameters
$params : array<string|int, mixed>

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

Return values
mixed

_approveFriend()

Approve our friend to add us to his userlist

protected _approveFriend(string $friend) : mixed
Parameters
$friend : string

Friedn username

Return values
mixed

_getFriends()

Get user friends

protected _getFriends() : array<string|int, mixed>
Return values
array<string|int, mixed>

of users

_getAdmins()

Get administartor usernames

private _getAdmins() : mixed
Return values
mixed

_loadFB()

Load FB content

private _loadFB() : mixed
Return values
mixed

factory()

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

private static factory([mixed $driver = null ][, array<string|int, mixed> $params = null ]) : Folks_Friends
Parameters
$driver : mixed = null
$params : array<string|int, mixed> = null

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

Return values
Folks_Friends

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

Search results