當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Content::__construct方法代碼示例

本文整理匯總了PHP中Content::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Content::__construct方法的具體用法?PHP Content::__construct怎麽用?PHP Content::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Content的用法示例。


在下文中一共展示了Content::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * class Content::__construct
  */
 public function __construct()
 {
     parent::__construct();
     //TODO: move to constants
     $this->type = VIDEO;
     $this->is_html = 0;
 }
開發者ID:Cyberspace-Networks,項目名稱:PeopleAggregator,代碼行數:10,代碼來源:Video.php

示例2: __construct

 protected function __construct($content_id)
 {
     $db = AbstractDb::getObject();
     // Init values
     $row = null;
     parent::__construct($content_id);
     $this->CONTENT_ORDERING_MODES = array('RANDOM' => _("Pick content elements randomly"), 'PSEUDO_RANDOM' => _("Pick content elements randomly, but not twice until all elements have been seen"), 'SEQUENTIAL' => _("Pick content elements in sequential order"));
     $this->CONTENT_CHANGES_ON_MODES = array('ALWAYS' => _("Content always rotates"), 'NEXT_DAY' => _("Content rotates once per day"), 'NEXT_LOGIN' => _("Content rotates once per session"), 'NEXT_NODE' => _("Content rotates each time you change node"), 'NEVER' => _("Content never rotates.  Usefull when showing all elements simultaneously in a specific order."));
     $this->ALLOW_REPEAT_MODES = array('YES' => _("Content can be shown more than once"), 'NO' => _("Content can only be shown once"), 'ONCE_PER_NODE' => _("Content can be shown more than once, but not at the same node"));
     $content_id = $db->escapeString($content_id);
     $sql = "SELECT * FROM content_group WHERE content_group_id='{$content_id}'";
     $db->execSqlUniqueRes($sql, $row, false);
     if ($row == null) {
         /*Since the parent Content exists, the necessary data in content_group had not yet been created */
         $sql = "INSERT INTO content_group (content_group_id) VALUES ('{$content_id}')";
         $db->execSqlUpdate($sql, false);
         $sql = "SELECT * FROM content_group WHERE content_group_id='{$content_id}'";
         $db->execSqlUniqueRes($sql, $row, false);
         if ($row == null) {
             throw new Exception(_("The content with the following id could not be found in the database: ") . $content_id);
         }
     }
     $this->content_group_row = $row;
     // These are for internal use only ( private and protected methods ) for dealing with expanding content
     $this->setTemporaryDisplayNumElements(null);
 }
開發者ID:cnlangzi,項目名稱:wifidog-auth,代碼行數:26,代碼來源:ContentGroup.php

示例3: __construct

 /**
  * Constructor
  *
  * @param string $content_id Content id
  *
  * @return void
  */
 protected function __construct($content_id)
 {
     $db = AbstractDb::getObject();
     // Init value
     $row = null;
     parent::__construct($content_id);
     $this->mDb =& $db;
     $content_id = $db->escapeString($content_id);
     $sql = "SELECT * FROM content_iframe WHERE iframes_id='{$content_id}'";
     $db->execSqlUniqueRes($sql, $row, false);
     if ($row == null) {
         /*
          * Since the parent Content exists, the necessary data in
          * content_group had not yet been created
          */
         $sql = "INSERT INTO content_iframe (iframes_id) VALUES ('{$content_id}')";
         $db->execSqlUpdate($sql, false);
         $sql = "SELECT * FROM content_iframe WHERE iframes_id='{$content_id}'";
         $db->execSqlUniqueRes($sql, $row, false);
         if ($row == null) {
             throw new Exception(_("The content with the following id could not be found in the database: ") . $content_id);
         }
     }
     $this->iframe_row = $row;
 }
開發者ID:cnlangzi,項目名稱:wifidog-auth,代碼行數:32,代碼來源:IFrame.php

示例4: __construct

 /**
  * @param $arrayRest
  * @return void
  */
 public function __construct($arrayRest = NULL)
 {
     parent::__construct($arrayRest);
     $this->sub = count($this->arrayRestFolder) > 1 ? $this->arrayRestFolder[1] : "";
     $this->my_redirect = "admin/page/select";
     $this->my_redirect .= "/" . $this->sub;
     $this->my_action .= "/" . $this->sub;
     //echo $this->sub;
     switch ($this->sub) {
         case "blog":
             $this->category_id = 36;
             break;
         case "sobre":
             $this->category_id = 15;
             $this->my_redirect = "/admin/page/edit/sobre/id.15/";
             break;
         case "franquias":
             $this->category_id = 42;
             $this->my_redirect = "/admin/page/edit/franquias/id.21/";
             //$this->total_files = 1;
             break;
         case "unidades":
             $this->my_redirect = "/admin/unidades/select/";
             //$this->total_files = 1;
             break;
         default:
             $this->category_id = 18;
             break;
     }
     if (DataHandler::getValueByArrayIndex($this->arrayVariable, "category_id")) {
         $this->category_id = DataHandler::forceInt(DataHandler::getValueByArrayIndex($this->arrayVariable, "category_id"));
     }
 }
開發者ID:reytuty,項目名稱:facil,代碼行數:37,代碼來源:Page.php

示例5: __construct

 /**
  * Construct a text content.
  *
  * @param   string  $content    Content.
  * @return  void
  */
 public function __construct($content = null)
 {
     parent::__construct();
     $this['content-transfer-encoding'] = 'quoted-printable';
     $this['content-type'] = 'text/plain; charset=utf-8';
     $this->append($content);
     return;
 }
開發者ID:Grummfy,項目名稱:Central,代碼行數:14,代碼來源:Text.php

示例6:

 function __construct($key)
 {
     // Database Key
     $this->setField('key', $key);
     // Set filterType
     $this->setField('filterType', 'post');
     parent::__construct(PATH_POSTS . $key . DS);
 }
開發者ID:michaelctorres,項目名稱:bludit,代碼行數:8,代碼來源:post.class.php

示例7: __construct

 public function __construct()
 {
     Logger::log("Enter: Event::__construct");
     parent::__construct();
     // Content
     $this->type = EVENT;
     $this->trackbacks = NULL;
     Logger::log("Exit: Event::__construct");
 }
開發者ID:Cyberspace-Networks,項目名稱:PeopleAggregator,代碼行數:9,代碼來源:Event.php

示例8: __construct

 /**
  * class Content::__construct
  */
 public function __construct()
 {
     parent::__construct();
     $this->type = 7;
     //if not set = reveiw
     $this->sb_upload_dir = SB_UPLOAD_DIR;
     $this->sb_upload_url = SB_UPLOAD_URL;
     $this->sb_mc_location = SB_MC_LOCATION;
 }
開發者ID:CivicCommons,項目名稱:oldBellCaPA,代碼行數:12,代碼來源:SBMicroContent.php

示例9: __construct

 /**
  * Constructor
  *
  * @param string $content_id Content id
  */
 protected function __construct($content_id)
 {
     parent::__construct($content_id);
     $db = AbstractDb::getObject();
     /**
      * HTML allowed to be used
      */
     $this->allowed_html_tags = "<a><br><b><h1><h2><h3><h4><h5><h6><i><img><li><ol><p><strong><u><ul><li><br/><hr><div></div>";
     $this->mBd =& $db;
 }
開發者ID:soitun,項目名稱:wifidog-auth,代碼行數:15,代碼來源:Langstring.php

示例10: __construct

 /**
  * class Content::__construct
  */
 public function __construct()
 {
     parent::__construct();
     //TODO: move to constants
     $this->type = QUESTION;
     $this->is_html = 0;
     $this->title = 'Question';
     $this->allow_comments = 1;
     $this->is_default_content = TRUE;
 }
開發者ID:CivicCommons,項目名稱:oldBellCaPA,代碼行數:13,代碼來源:Question.php

示例11: __construct

 public function __construct($arrayRestFolder = NULL)
 {
     parent::__construct($arrayRestFolder);
     //categoria produtos
     $this->category_id = 43;
     $this->my_redirect = "backend/client/show";
     if (isset($_POST["to"])) {
         $this->my_redirect = $_POST["to"];
     }
 }
開發者ID:reytuty,項目名稱:facil,代碼行數:10,代碼來源:Client.php

示例12: __construct

 public function __construct()
 {
     parent::__construct();
     global $CMS_ADMIN_PAGE;
     if (isset($CMS_ADMIN_PAGE)) {
         $this->error_types = array('404' => lang('404description'));
     }
     $this->doAliasCheck = false;
     $this->doAutoAliasIfEnabled = false;
     $this->mType = strtolower(get_class($this));
 }
開發者ID:aldrymaulana,項目名稱:cmsdepdagri,代碼行數:11,代碼來源:ErrorPage.inc.php

示例13: __construct

 public function __construct($data = array())
 {
     parent::__construct();
     $this->entityType = 'banner';
     if (!empty($data['id'])) {
         $CMS = new CMS();
         $this->id = $data['id'];
         $this->populate_object($CMS->get_entity_data($this));
     }
     $this->populate_object($data);
 }
開發者ID:jerwarren,項目名稱:digital-publishing-tools-for-wordpress,代碼行數:11,代碼來源:dpsfa-banner.php

示例14: __construct

 /**
  * Constructor
  *
  * @param string $content_id Content Id
  *
  * @return void     */
 protected function __construct($content_id)
 {
     $db = AbstractDb::getObject();
     // Init values
     $row = null;
     parent::__construct($content_id);
     $content_id = $db->escapeString($content_id);
     $sql_select = "SELECT * FROM content_group_element WHERE content_group_element_id='{$content_id}'";
     $db->execSqlUniqueRes($sql_select, $row, false);
     $this->content_group_element_row = $row;
     /* A content group element is NEVER persistent */
     parent::setIsPersistent(false);
 }
開發者ID:soitun,項目名稱:wifidog-auth,代碼行數:19,代碼來源:ContentGroupElement.php

示例15: __construct

 /**
  * Constructor
  * @since Version 3.5
  * @param int|string $id
  */
 public function __construct($id = null)
 {
     parent::__construct();
     if (filter_var($id, FILTER_VALIDATE_INT)) {
         $this->id = $id;
     } elseif (is_string($id) && strlen($id) > 1) {
         $query = "SELECT pid FROM nuke_pages WHERE shortname = ?";
         $this->id = $this->db->fetchOne($query, $id);
     }
     if (filter_var($this->id)) {
         $this->mckey = sprintf("railpage:page=%d", $this->id);
         $this->fetch();
     }
 }
開發者ID:railpage,項目名稱:railpagecore,代碼行數:19,代碼來源:Page.php


注:本文中的Content::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。