\MegogoInterface
Megogo OTT service implementation class
Synopsis
class MegogoInterface
{
- // constants
- const URL_ME = '?module=megogo';
- const URL_TARIFFS = 'tariffs=true';
- const URL_SUBS = 'subscriptions=true';
- const URL_AJSUBS = 'ajsubs=true';
- const URL_SUBVIEW = 'subview=true';
- const URL_REPORTS = 'reports=true';
- // members
- protected array $altCfg = ;
- protected $messages = '';
- protected array $allTariffs = ;
- protected array $allSubscribers = ;
- protected array $allHistory = ;
- protected array $allQueue = ;
- protected array $allUsers = ;
- // methods
- public void __construct()
- protected void loadAlter()
- protected void initMessages()
- protected void loadTariffs()
- protected void loadSubscribers()
- protected void loadHistory()
- protected void loadQueue()
- protected void loadUsers()
- public string getTariffServiceId()
- public float getTariffFee()
- protected bool checkFreePeriodAvail()
- protected bool checkTariffAvail()
- protected bool checkTariffPrimary()
- protected float getDaylyFee()
- public void/string createSubscribtion()
- public void deleteSubscribtion()
- public string renderPanel()
- public string renderTariffs()
- public string tariffCreateForm()
- protected string tariffEditForm()
- public void/string tariffSave()
- public void/string tariffCreate()
- protected bool tariffProtected()
- public void/string tariffDelete()
- protected string colorImportant()
- public string renderSubscribtionsReportMonthly()
- protected string jqDtFilter()
- public string renderSubscribtionsReportDaily()
- public string renderSubscribtions()
- public void subscribtionsListAjax()
- public string renderSubManagerForm()
- public void/string catchManualAction()
- protected float getUserBalance()
- protected void createQueue()
- protected bool checkSchedule()
- public string scheduleUnsubscribe()
- public string scheduleProcessing()
- public string subscriptionFeeProcessing()
- public string subscriptionFreeCleanup()
Constants
Name | Value |
---|---|
URL_ME | '?module=megogo' |
URL_TARIFFS | 'tariffs=true' |
URL_SUBS | 'subscriptions=true' |
URL_AJSUBS | 'ajsubs=true' |
URL_SUBVIEW | 'subview=true' |
URL_REPORTS | 'reports=true' |
Members
protected
- $allHistory
—
array
Contains all subscribtions history by all of users id=>data - $allQueue
—
array
Contains all of available scheduled actions queue as id => queue data - $allSubscribers
—
array
Contains available and active megogo service subscriptions as id=>data - $allTariffs
—
array
Contains available megogo service tariffs id=>tariffdata - $allUsers
—
array
Contains all of internet users data as login=>data - $altCfg
—
array
System alter.ini config stored as array key=>value - $messages
—
System messages object placeholder
Methods
protected
- checkFreePeriodAvail() — Checks free period availability for user
- checkSchedule() — Checks is queue for this login/tariff clean?
- checkTariffAvail() — Check user tariff subscribtion possibility
- checkTariffPrimary() — Checks user for only one primary subscription
- colorImportant() — Colorize important report columns
- createQueue() — Creates scheduler task in database
- getDaylyFee() — Returns valid dayly fee for some tariff/month
- getUserBalance() — Returns some user balance
- initMessages() — Initializes system message helper
- jqDtFilter() — Performs basic data filtering
- loadAlter() — Loads system alter config into private prop
- loadHistory() — Loads existing subscribers data
- loadQueue() — Loads scheduled queue from database
- loadSubscribers() — Loads existing subscribers data
- loadTariffs() — Loads existing tariffs from database for further usage
- loadUsers() — Loads available users from database
- tariffEditForm() — Returns tariff editing form
- tariffProtected() — Checks is tariff used by some users
public
- __construct()
- catchManualAction() — Catches and do some manual actions
- createSubscribtion() — Create subscription
- deleteSubscribtion() — Deletes existing subscription
- getTariffFee() — Returns tariffs price
- getTariffServiceId() — Returns tariffs Megogo service ID
- renderPanel() — Returns primary controls panel
- renderSubManagerForm() — Renders subscribtion management form
- renderSubscribtions() — Returns data container for active subscriptions
- renderSubscribtionsReportDaily() — Renders default subscriptions report
- renderSubscribtionsReportMonthly() — Renders default subscriptions report
- renderTariffs() — Renders available tariffs list
- scheduleProcessing() — Performs scheduler queue actions
- scheduleUnsubscribe() — Schedules tariff unsubscribe from next month
- subscribtionsListAjax() — Renders ajax data subscriptions
- subscriptionFeeProcessing() — Performs available active subscriptions fee processing
- subscriptionFreeCleanup() — Performs cleanup of expired free subscriptions
- tariffCreate() — Creates new tariff in database
- tariffCreateForm() — Returns tariff creation form
- tariffDelete() — Deletes existing tariff from database
- tariffSave() — Catches tariff editing form data