当前位置: 首页>>代码示例>>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;未经允许,请勿转载。