当前位置: 首页>>代码示例>>PHP>>正文


PHP model::model方法代码示例

本文整理汇总了PHP中model::model方法的典型用法代码示例。如果您正苦于以下问题:PHP model::model方法的具体用法?PHP model::model怎么用?PHP model::model使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在model的用法示例。


在下文中一共展示了model::model方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: NOW

 function __construct()
 {
     parent::model();
     $this->load->helper('crosswords');
     $this->load->model('comments_model');
     $this->load->model('businesscards_model');
     // Snippets of useful sql
     $this->overdue_sql = '((`crossword_deadline` IS NOT NULL ' . '	AND `crossword_deadline`    <= NOW()) ' . 'OR (`crossword_publication` IS NOT NULL ' . '	AND `crossword_publication` <= NOW() ' . '	AND `crossword_completeness` != 100))';
     $this->published_sql = '(`crossword_publication` IS NOT NULL ' . 'AND `crossword_publication` <= NOW() ' . 'AND `crossword_completeness` = 100)';
     $this->scheduled_sql = '(`crossword_publication` IS NOT NULL ' . 'AND NOT ' . $this->published_sql . ')';
     $this->winner_count_sql = '(SELECT COUNT(*) ' . 'FROM `crossword_winners` ' . 'WHERE `crossword_winner_crossword_id` = `crossword_id`)';
     $this->expired_sql = '((`crossword_expiry` IS NOT NULL AND `crossword_expiry` <= NOW()) ' . 'OR	' . $this->winner_count_sql . ' >= `crossword_winners`)';
 }
开发者ID:TheYorkerArchive,项目名称:codebase-2006-2012,代码行数:13,代码来源:crosswords_model.php

示例2: __construct

 public function __construct()
 {
     parent::model();
     session_start();
     $this->load->model('organisation_model');
     // Check if we already have login details
     if (isset($_SESSION['ua_loggedin'])) {
         $this->isLoggedIn = $_SESSION['ua_loggedin'];
         $this->username = $_SESSION['ua_username'];
         $this->isUni = $_SESSION['ua_username'];
         $this->entityId = $_SESSION['ua_entityId'];
         $this->isUser = $_SESSION['ua_isuser'];
         if (array_key_exists('ua_timeformat', $_SESSION)) {
             $this->timeFormat = $_SESSION['ua_timeformat'];
         }
         $this->officeLogin = $_SESSION['ua_hasoffice'];
         $this->officeType = $_SESSION['ua_officetype'];
         $this->officeInterface = $_SESSION['ua_officeinterface'];
         $this->firstname = $_SESSION['ua_firstname'];
         $this->surname = $_SESSION['ua_surname'];
         $this->permissions = $_SESSION['ua_permissions'];
         $this->organisationLogin = $_SESSION['ua_organisation'];
         $this->organisationName = $_SESSION['ua_organisationname'];
         $this->organisationShortName = $_SESSION['ua_organisationshortname'];
         $this->allTeams = $_SESSION['ua_allteams'];
         $this->salt = $_SESSION['ua_salt'];
     }
     if (!$this->isLoggedIn && isset($_COOKIE['SavedLogin'])) {
         // Try to perform the login from a cookie
         try {
             $details = explode(':$:', $_COOKIE['SavedLogin']);
             if (count($details) == 2) {
                 // We have a username and has, login
                 $this->loginByHash($details[0], $details[1], true);
             } elseif (count($details) == 1) {
                 // We just have the username
                 $this->username = $details[0];
             }
         } catch (Exception $e) {
             // Failing is fine
         }
     }
 }
开发者ID:TheYorkerArchive,项目名称:codebase-2006-2012,代码行数:43,代码来源:user_auth.php

示例3:

 function __construct()
 {
     parent::model();
     $this->load->library('academic_calendar');
 }
开发者ID:TheYorkerArchive,项目名称:codebase-2006-2012,代码行数:5,代码来源:recurrence_model.php

示例4:

 function __construct()
 {
     parent::model();
 }
开发者ID:TheYorkerArchive,项目名称:codebase-2006-2012,代码行数:4,代码来源:comments_model.php

示例5:

 /**
  * @param $Structure array URI processing structure.
  */
 function __construct($Structure)
 {
     parent::model();
     // Initialise
     $this->mStructure = $Structure;
 }
开发者ID:TheYorkerArchive,项目名称:codebase-2006-2012,代码行数:9,代码来源:uri_tree_subcontroller.php

示例6:

 function __construct()
 {
     parent::model();
     $this->load->model('organisation_model');
 }
开发者ID:TheYorkerArchive,项目名称:codebase-2006-2012,代码行数:5,代码来源:notices_model.php

示例7:

 function __construct()
 {
     parent::model();
     $this->load->helper('uri_tail');
 }
开发者ID:TheYorkerArchive,项目名称:codebase-2006-2012,代码行数:5,代码来源:calendar_actions.php

示例8:

 function __construct()
 {
     parent::model();
     $this->load->helper('uri_tail');
     $this->load->model('calendar/calendar_actions');
 }
开发者ID:TheYorkerArchive,项目名称:codebase-2006-2012,代码行数:6,代码来源:organiser_actions.php


注:本文中的model::model方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。