\OmegaTV
OmegaTV OTT service implementation
Synopsis
class OmegaTV
{
- // constants
- const URL_ME = '?module=omegatv';
- const URL_PROFILE = '?module=userprofile&username=';
- const URL_SUBSCRIBER = '?module=omegatv&customerprofile=';
- // members
- protected $hls = '';
- protected array $altCfg = ;
- protected array $allTariffs = ;
- protected array $tariffNames = ;
- protected array $allUsers = ;
- protected array $allUserData = ;
- protected array $queue = ;
- protected $messages = '';
- protected integer $chanIconSize = 32;
- protected bool $unsubDelay = false;
- protected array $suspended = ;
- protected array $bundledTariffs = ;
- // methods
- public void __construct()
- protected void loadAlter()
- protected void loadBundleTariffs()
- protected void initHls()
- protected void initMessages()
- protected void loadTariffs()
- protected void loadQueue()
- protected void loadSuspended()
- protected void loadUserProfiles()
- protected void loadUserData()
- public string renderTariffsRemote()
- protected string getTariffName()
- public string getUserDevicesData()
- public string getUserPlaylistsData()
- public void deleteUserDevice()
- public void deleteUserPlaylist()
- public void/string assignUserPlaylist()
- protected string renderManualTariffForm()
- public void changeUserTariffs()
- protected string renderDeviceAddForm()
- public void/string assignDeviceManual()
- public void/string assignPlaylistManual()
- protected string renderProfileControls()
- public void setCustomerActive()
- public string renderUserInfo()
- public string renderDevicesList()
- protected array extractBundle()
- protected string ajDevCodeLink()
- public string renderPanel()
- protected string renderUserRegisterForm()
- public void/strin registerUserManual()
- public string renderChanControls()
- protected array getTariffsRemote()
- public string renderTariffCreateForm()
- protected string renderTariffEditForm()
- public void catchTariffSave()
- public void createTariff()
- public string renderTariffsList()
- public bool isTariffProtected()
- public void deleteTariff()
- public int generateCustormerId()
- public string generateWebURL()
- public string getWebUrlByLogin()
- public int getLocalCustomerId()
- public string getLocalCustomerLogin()
- public string generateDeviceCode()
- public string getDeviceCodeByLogin()
- public void deleteDevice()
- public void deletePlaylist()
- protected void createUserProfile()
- protected array getTariffData()
- public void/string createSubscription()
- protected void chargeFee()
- protected void suspendUser()
- public void/string deleteSubscription()
- public string renderUserListContainer()
- public void ajUserList()
- public void chargeAllUsersFee()
- public void resurrectAllUsers()
Constants
Name | Value |
---|---|
URL_ME | '?module=omegatv' |
URL_PROFILE | '?module=userprofile&username=' |
URL_SUBSCRIBER | '?module=omegatv&customerprofile=' |
Members
protected
- $allTariffs
—
array
Contains all of available omega tariffs as id=>data - $allUserData
—
array
Contains available users data as login=>data - $allUsers
—
array
Contains available user profiles as customerid=>data - $altCfg
—
array
Contains system alter config as key=>value - $bundledTariffs
—
array
Contains bundled internet tariffs names as name=>someshit. No fee charging for them. Lol. - $chanIconSize
—
int
Contains default channel icon size - $hls
—
HlsTV object placeholder for further usage - $messages
—
System message helper object placeholder - $queue
—
array
Contains local queue for deffered actions - $suspended
—
array
Contains array of currently suspended users without base tariff - $tariffNames
—
array
Contains all tariff names as tariffid=>name - $unsubDelay
—
bool
Is tariffs unsub delayed in queue or not flag
Methods
protected
- ajDevCodeLink() — Returns device activation code ajax link
- chargeFee() — Charges fee for some tariff
- createUserProfile() — Creates new user profile
- extractBundle() — Extract existing customer available tariffs
- getTariffData() — Returns tariff local data
- getTariffName() — Trys to render human-readable tariff name
- getTariffsRemote() — Returns array of available remote tariffs as tariffid=>name
- initHls() — Inits HLS object for further usage
- initMessages() — Inits system message helper
- loadAlter() — Loads system alter config into protected property.
- loadBundleTariffs() — Loads bundle tariffs list from config option into protected prop.
- loadQueue() — Loads existing queue records for some actions
- loadSuspended() — Loads existing suspended users
- loadTariffs() — Loads existing tariffs from database
- loadUserData() — Loads internet users data into protected property for further usage
- loadUserProfiles() — Loads existing users profiles
- renderDeviceAddForm() — Renders manual device assign form
- renderManualTariffForm() — Renders form to manual tariff changing
- renderProfileControls() — Renders profile controls
- renderTariffEditForm() — Renders tariff editing form
- renderUserRegisterForm() — Renders new customer registration form
- suspendUser() — Sets user as suspended or not to preventing his automatic ressurection
public
- __construct() — Creates new OmegaTV instance
- ajUserList() — Renders JSON data for ajax user list container content
- assignDeviceManual() — Assigns some device uniq to some customer
- assignPlaylistManual() — Assigns new playlist for some existing user
- assignUserPlaylist() — Creates new playlist and assigns it to existing user
- catchTariffSave() — Catches tariff editing request and edits it in database if something changed
- changeUserTariffs() — Performs editing of user tariffs
- chargeAllUsersFee() — Charges all users tariffs fee, disables it when users go down
- createSubscription() — Creates some subscription if it possible
- createTariff() — Creates new tariff in database
- deleteDevice() — Deletes device assigned to some customerid
- deletePlaylist() — Deletes playlist assigned to some customerid
- deleteSubscription() — Deletes or pushes queue for some subscription if it possible
- deleteTariff() — Deletes some tariff from database
- deleteUserDevice() — Deletes some device from user
- deleteUserPlaylist() — Deletes some playlists assigned from user
- generateCustormerId() — Returns user login transformed to some numeric hash
- generateDeviceCode() — Returns new device activation code
- generateWebURL() — Returns web-player URL
- getDeviceCodeByLogin() — Returns new device activation code by user login
- getLocalCustomerId() — Returns local customer ID from database
- getLocalCustomerLogin() — Returns local customer login by ID from database
- getUserDevicesData() — Returns current user devices info as JSON
- getUserPlaylistsData() — Returns current user playlists info as JSON
- getWebUrlByLogin() — Returns web URL by some user login
- isTariffProtected() — Checks is tariff used by some customers
- registerUserManual() — Creates new user profile for existing internet user
- renderChanControls() — Renders channels preview controls panel
- renderDevicesList() — Renders list of all devices with some controls
- renderPanel() — Renders default module controls
- renderTariffCreateForm() — Renders tariff creation form
- renderTariffsList() — Renders list of available tariffs
- renderTariffsRemote() — Renders available tariffs list
- renderUserInfo() — Renders some user profile info
- renderUserListContainer() — Renders available subscriptions container list with some controls
- resurrectAllUsers() — Resurrects some users if their was disabled by inactivity
- setCustomerActive() — Sets user local and remote profile as active or not