示例#1
0
 public function __construct()
 {
     // Construct any possible parent;
     parent::__construct();
     // Do the tie ...
     $this->tieInCommonConfiguration();
     // Set the proper configuration options, from the config file;
     self::$objLetterTable = $this->getConfigKey(new S('newsletter_table'));
     self::$objLetterTableFId = $this->getConfigKey(new S('newsletter_table_field_id'));
     self::$objLetterTableFEML = $this->getConfigKey(new S('newsletter_table_field_email'));
     self::$objLetterTableFFirstName = $this->getConfigKey(new S('newsletter_table_field_first_name'));
     self::$objLetterTableFLastName = $this->getConfigKey(new S('newsletter_table_field_last_name'));
     self::$objLetterTableFType = $this->getConfigKey(new S('newsletter_table_field_email_type'));
     self::$objLetterTableFConfirmed = $this->getConfigKey(new S('newsletter_table_field_is_confirmed'));
     self::$objLetterTableFKey = $this->getConfigKey(new S('newsletter_table_field_confirmation_key'));
     self::$objLetterTableFSubscribed = $this->getConfigKey(new S('newsletter_table_field_date'));
     self::$objLetterTableFCategoryId = $this->getConfigKey(new S('newsletter_table_field_category_id'));
     // Categories ...
     self::$objCategoryTable = $this->getConfigKey(new S('newsletter_category_table'));
     self::$objCategoryTableFId = $this->getConfigKey(new S('newsletter_category_table_id'));
     self::$objCategoryTableFName = $this->getConfigKey(new S('newsletter_category_table_name'));
     self::$objCategoryTableFSEO = $this->getConfigKey(new S('newsletter_category_table_seo'));
     self::$objCategoryTableFDescription = $this->getConfigKey(new S('newsletter_category_table_description'));
     self::$objCategoryTableFDate = $this->getConfigKey(new S('newsletter_category_table_date'));
     // Load'em defaults ... ATH, STG and others ...
     $this->ATH = MOD::activateModule(new FilePath('mod/authentication'), new B(TRUE));
     $this->STG = MOD::activateModule(new FilePath('mod/settings'), new B(TRUE));
     // DB: Auto-CREATE:
     $objQueryDB = new FileContent($this->getPathToModule()->toRelativePath() . _S . CFG_DIR . _S . __CLASS__ . SCH_EXTENSION);
     // Make a FOREACH on each ...
     foreach (_S($objQueryDB->toString())->fromStringToArray(RA_SCHEMA_HASH_TAG) as $k => $v) {
         // Make'em ...
         $this->_Q(_S($v));
     }
     // Get an MPTT Object, build the ROOT, make sure the table is OK;
     self::$objMPTT = new MPTT(self::$objCategoryTable, MPTT::mpttAddUnique(new S(__CLASS__), new S((string) $_SERVER['REQUEST_TIME'])));
 }