本文整理汇总了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`)';
}
示例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
}
}
}
示例3:
function __construct()
{
parent::model();
$this->load->library('academic_calendar');
}
示例4:
function __construct()
{
parent::model();
}
示例5:
/**
* @param $Structure array URI processing structure.
*/
function __construct($Structure)
{
parent::model();
// Initialise
$this->mStructure = $Structure;
}
示例6:
function __construct()
{
parent::model();
$this->load->model('organisation_model');
}
示例7:
function __construct()
{
parent::model();
$this->load->helper('uri_tail');
}
示例8:
function __construct()
{
parent::model();
$this->load->helper('uri_tail');
$this->load->model('calendar/calendar_actions');
}