Beispiel #1
0
 public function __construct()
 {
     // Construct any possible parent, parse the configuration meanwhile;
     parent::__construct();
     // Tie in common configuration data;
     $this->tieInCommonConfiguration();
     // Get object configuration data, and set current object properties;
     self::$objTextTable = $this->getConfigKey(new S('texts_table'));
     self::$objTextTableFId = $this->getConfigKey(new S('texts_table_field_id'));
     self::$objTextTableFTitle = $this->getConfigKey(new S('texts_table_field_title'));
     self::$objTextTableFSEO = $this->getConfigKey(new S('texts_table_field_seo'));
     self::$objTextTableFContent = $this->getConfigKey(new S('texts_table_field_content'));
     self::$objTextTableFTags = $this->getConfigKey(new S('texts_table_field_tags'));
     self::$objTextTableFCanComment = $this->getConfigKey(new S('texts_table_field_can_comment'));
     self::$objTextTableFDatePublished = $this->getConfigKey(new S('texts_table_field_date_published'));
     self::$objTextTableFDateUpdated = $this->getConfigKey(new S('texts_table_field_date_updated'));
     self::$objTextTableFAuthorId = $this->getConfigKey(new S('texts_table_field_author_id'));
     self::$objTextTableFCategoryId = $this->getConfigKey(new S('texts_table_field_category_id'));
     // Categories ...
     self::$objCategoryTable = $this->getConfigKey(new S('texts_category_table'));
     self::$objCategoryTableFId = $this->getConfigKey(new S('texts_category_table_id'));
     self::$objCategoryTableFName = $this->getConfigKey(new S('texts_category_table_name'));
     self::$objCategoryTableFSEO = $this->getConfigKey(new S('texts_category_table_seo'));
     // Comments ...
     self::$objCommentsTable = $this->getConfigKey(new S('texts_comments_table'));
     self::$objCommentsTableFId = $this->getConfigKey(new S('texts_comments_table_id'));
     self::$objCommentsTableFName = $this->getConfigKey(new S('texts_comments_table_name'));
     self::$objCommentsTableFEML = $this->getConfigKey(new S('texts_comments_table_email'));
     self::$objCommentsTableFURL = $this->getConfigKey(new S('texts_comments_table_website'));
     self::$objCommentsTableFRUId = $this->getConfigKey(new S('texts_comments_table_registered_user_id'));
     self::$objCommentsTableFComment = $this->getConfigKey(new S('texts_comments_table_comment'));
     self::$objCommentsTableFApproved = $this->getConfigKey(new S('texts_comments_table_approved'));
     self::$objCommentsTableFDate = $this->getConfigKey(new S('texts_comments_table_date'));
     self::$objCommentsTableFTextId = $this->getConfigKey(new S('texts_comments_table_text_id'));
     // 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, new S(__CLASS__));
     // 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));
 }