function __construct() { // Call the parent constructor parent::__construct('account_info', DB_DEFAULT); // Set the relationships $this->HasOne('User'); // Set the Required $this->SetRequired(array('user_id', 'name')); }
function __construct() { // Call the parent constructor parent::__construct('answers', DB_DEFAULT); // Set the relationships $this->HasMany('Category', 'AnswerCategory'); // Set the Required $this->SetRequired(array('user_id', 'question_id', 'question', 'date_asked')); }
/** * The constructor of Model class * * @param mixed $data Data for filling the model * * @return void */ public function __construct($data = null) { $this->_setUp(); $this->setUpData($data); parent::__construct(); $this->_loadRelations(); $this->_oldPrimaryKey = array(); $this->_savePrimaryKey(); }
function __construct() { // Call the parent constructor parent::__construct('users', DB_DEFAULT); // Set the relationships $this->HasOne('AccountInfo'); $this->HasMany('Category'); // Set the Required $this->SetRequired(array('username', 'oauth_token', 'oauth_token_secret')); }
function __construct() { // Call the parent constructor parent::__construct('answer_category', DB_DEFAULT); // Set the relationships $this->HasMany('Answer'); $this->HasMany('Category'); // Set the Required $this->SetRequired(array('answer_id', 'category_id')); }
function __construct() { // Call the parent constructor parent::__construct('categories', DB_DEFAULT); // Set the relationships $this->HasMany('Answer', 'AnswerCategory'); $this->BelongsTo('User'); // Set the Required $this->SetRequired(array('user_id', 'status', 'category')); }
/** * Session constructor */ public function __construct() { parent::__construct(); if (is_null(static::$config) && isset($GLOBALS['config'])) { static::$config = $GLOBALS['config']; } // User information if (php_sapi_name() != 'cli' && !isset($_SERVER['REMOTE_ADDR'])) { throw new ErrorException('Unable to determine your IP address.'); } $this->userip = DetectProxy(); if (empty($this->userip)) { $this->userip = $_SERVER['REMOTE_ADDR']; } $this->useragent = isset($_SERVER['HTTP_USER_AGENT']) ? substr($_SERVER['HTTP_USER_AGENT'], 0, 100) : ''; // Filter out long numbers (4+ digits) $this->useragent = preg_replace('/([0-9]{4,12})/', '', $this->useragent); // Filter out version except major version number $this->useragent = preg_replace('/([0-9]{1,10})([\\._-])?([0-9]{1,10})?([\\._-])?([0-9]{1,10})?([\\._-])?([0-9]{1,10})?([\\._-])?([0-9]{1,10})?/', '$1', $this->useragent); }
function __construct($id = null) { parent::__construct($id); }
public function __construct($group_name = '') { parent::__construct(); $this->initDb($group_name); }
public function __construct($id = 0) { parent::__construct($id); }
public function __construct($id = 0) { parent::__construct($id); $this->pl = ilCertificatePlugin::getInstance(); }
/** * @param int $primary_key * @param bool $dev */ public function __construct($primary_key = 0, $dev = false) { parent::__construct($primary_key, new arConnectorSession()); }
public function __construct($id = 0) { global $ilLog, $ilAppEventHandler; parent::__construct($id); $this->log = $ilLog; $this->pl = ilCertificatePlugin::getInstance(); $this->event_handler = $ilAppEventHandler; }
public function __construct($scenario = 'insert', $api_name = null) { $this->_api_name = $api_name; parent::__construct($scenario); }