\FriendshipIsMagic
Referal like bonus program for users
Synopsis
class FriendshipIsMagic
{
- // members
- protected array $allFriends = ;
- protected array $altCfg = ;
- protected array $allUsers = ;
- protected array $rawPayments = ;
- protected integer $percent = 0;
- protected integer $payid = 1;
- // methods
- public void __construct()
- protected void loadAltCfg()
- protected void setPercent()
- protected void setPayid()
- protected void loadFriends()
- protected void loadUsers()
- protected bool isFriendable()
- public void createFriend()
- public void deleteFriend()
- public string renderCreateForm()
- public string renderFriendsList()
- protected void loadDailyPayments()
- public void friendsDailyProcessing()
Members
protected
- $allFriends
—
array
All of available user relations as friend=>parent - $allUsers
—
array
Contains all available users as login=>data - $altCfg
—
array
System alter.ini config stored as array key=>value - $payid
—
int
Payment type for friendship payments - $percent
—
int
Friendship payment percent - $rawPayments
—
array
Contains raw payments array
Methods
protected
- isFriendable() — Checks is user allowed to set as someone friend
- loadAltCfg() — Loads system alter config
- loadDailyPayments() — Loads yesterday payments
- loadFriends() — Loads all of existing friends relations from database to protected property
- loadUsers() — Loads all of existing users from database to protected property
- setPayid() — Sets payments cashtype
- setPercent() — Sets payments percent for further usage
public
- __construct()
- createFriend() — Creates friend-parent relationship as database record
- deleteFriend() — Removes login from friendship relations
- friendsDailyProcessing() — Performs friends yesterday payments processing
- renderCreateForm() — Renders friendship creation form
- renderFriendsList() — Renders list of associated friend users for some parent login