\LousyTariffs
The class designed to manage rarely used tariffs
Synopsis
class LousyTariffs
{
- // constants
- const TABLE_LOUSY = 'lousytariffs';
- const RIGHT_CONFIG = 'LOUSYTARIFFS';
- const URL_ME = '?module=lousytariffs';
- const ROUTE_DELETE = 'deletelousytariff';
- const PROUTE_CREATE = 'createlousytariff';
- // members
- protected array $allLousyTariffs = ;
- protected array $allTariffs = ;
- protected $lousyDb = '';
- protected $messages = '';
- // methods
- public void __construct()
- protected void initMessages()
- protected void initLousyDb()
- protected void loadLousyTariffs()
- protected void loadAllTariffs()
- protected bool isLousy()
- protected bool isNotLousy()
- public void/string create()
- public void/string delete()
- public void flush()
- public array truncateLousy()
- protected string renderCreateForm()
- protected string renderDeleteForm()
- public string renderList()
Constants
Name | Value |
---|---|
TABLE_LOUSY | 'lousytariffs' |
RIGHT_CONFIG | 'LOUSYTARIFFS' |
URL_ME | '?module=lousytariffs' |
ROUTE_DELETE | 'deletelousytariff' |
PROUTE_CREATE | 'createlousytariff' |
Members
protected
- $allLousyTariffs
—
array
Contains array of all available lousy tariffs as tariffName=>lousyhData[id/tariff] - $allTariffs
—
array
Contains array of all available system tariffs as tariffName=>tariffData - $lousyDb
—
Lousy tariffs database abstraction layer placeholder - $messages
—
System messages helper instance placeholder
Methods
protected
- initLousyDb() — Inits database abstraction layer object for further usage
- initMessages() — Inits message helper instance
- isLousy() — Checks is tariff marked as lousy?
- isNotLousy() — Checks is tariff not marked as lousy?
- loadAllTariffs() — Loads existing tariffs. Required only for cfg iface.
- loadLousyTariffs() — Loads available lousy tariffs data from database
- renderCreateForm() — Renders new lousy tariff creation form
- renderDeleteForm() — Renders existing lousy tariff deletion form
public
- __construct()
- create() — Creates new lousy tariff
- delete() — Deletes existing lousy tariff
- flush() — Flushes existing lousy tariff on system tariff deletion
- renderList() — Renders list of available lousy tariffs
- truncateLousy() — Returns array copy without lousy tariffs