Edit via SFTP
  1. <?php namespace greenmine;
  2. /*
  3.   FILE: greennmine/app.php
  4.   PURPOSE: Greenmine application framework classes
  5.   HISTORY:
  6.   2013-11-13 Extracted clsVbzApp from vbz-page.php
  7.   2016-06-13 Adapting for Greenmine
  8.   2017-01-24 rewriting/updating for Ferreteria revisions (wasn't working before anyway)
  9.   2017-04-17 Removing gtAdminObject because the only content was SystemEventsClass() and I'm removing that too.
  10.   We're going to the App object to retrieve the event log now.
  11.   2020-03-08 some tidying and updating
  12. */
  13.  
  14. class cMenuKiosk extends \fcMenuKiosk_admin {
  15. # public function GetBasePath() : string { return cGlobals::GetWebPath_forAppBase(); }
  16. }
  17.  
  18. /*::::
  19.   PURPOSE: main application framework class for Greenmine
  20. */
  21. class cApp extends \fcAppStandardAdmin {
  22. private $oPage;
  23. private $oData;
  24.  
  25. // ++ SETUP ++ //
  26.  
  27. public function Go() {
  28. $this->SetStartTime(); // get the starting time, for benchmarking
  29. parent::Go();
  30. }
  31.  
  32. // -- SETUP -- //
  33. // ++ CLASSES ++ //
  34.  
  35. protected function GetPageClass() : string { return cPage::class; }
  36. protected function GetKioskClass() : string { return cMenuKiosk::class; }
  37.  
  38. // -- CLASSES -- //
  39. // ++ OBJECTS ++ //
  40.  
  41. private $db = NULL;
  42. // CEMENT
  43. public function GetDatabase() : \ferret\data\cDatabase {
  44. if (is_null($this->db)) {
  45. $this->db = \ferret\data\cDatabase::Instantiate(static::Globals()->GetGreenmineDBSpec(), FALSE);
  46. }
  47. return $this->db;
  48. }
  49.  
  50. // -- OBJECTS -- //
  51.  
  52. }
  53.