本文整理汇总了PHP中User::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP User::__construct方法的具体用法?PHP User::__construct怎么用?PHP User::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类User
的用法示例。
在下文中一共展示了User::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: test__construct
/**
* Tests User->__construct()
*/
public function test__construct()
{
$this->User->__construct();
if (get_class($this->User) != 'User') {
$this->fail();
}
}
示例2: __construct
public function __construct($id, $mail, $name, $description, $skLeague)
{
parent::__construct($id, $mail);
$this->name = $name;
$this->description = $description;
$this->skLeague = $skLeague;
}
示例3:
function __construct($uname = null)
{
parent::__construct();
$this->page_error = "";
$this->setLoginTemplates();
$this->scriptspresent = FALSE;
}
示例4: __construct
/**
* Constructor.
* The parameter is used for preventing "strict" error.
*
* @param bool|int $id
*
* @todo избавиться от hardcoded имен полей формы?
*/
public function __construct($id = false)
{
if (isset($_SESSION['UID'])) {
$id = $_SESSION['UID'];
}
parent::__construct($id);
}
示例5: __construct
public function __construct($name, $email)
{
$this->_date = "11-01-1996";
$this->_type = "Viewer";
$this->_level = 1;
parent::__construct($name, $email);
}
示例6: array
function __construct(&$db, $id = false)
{
parent::__construct($db);
if (!$id) {
$this->id = 0;
$this->login = '';
$this->name = '';
$this->family = '';
$this->daddy = '';
$this->mobile_telephone = '';
$this->is_deleted = false;
$this->groups = array();
$this->groups_flip = array();
$this->groups_SQL = '';
$this->set_groups_sql = false;
return;
}
$this->id = $id;
if (!($row = $this->db->Query_Fetch_Assoc("SELECT * FROM users WHERE id=" . $this->id . " LIMIT 0,1"))) {
throw new SysUserError("невозможно создать объект - не найдена запись в БД", $this->id);
}
$this->login = $row["login"];
$this->name = $row["name"];
$this->family = $row["family"];
$this->daddy = $row["daddy"];
$this->mobile_telephone = $row["mobile_telephone"];
$this->is_deleted = $row["is_deleted"] == 0 ? false : true;
if (!($result = $this->db->Query_Fetch("SELECT group_id FROM groups_users WHERE user_id=" . $this->id))) {
throw new SysUserError("невозможно создать объект - не найдено записей груп", $this->id, $this->login);
}
foreach ($result as $row) {
$this->groups[] = $row["group_id"];
}
}
示例7: personeel
function __construct($id, $gebruikersnaam = "", $voornaam = "", $achternaam = "", $laatsteOnline = "", $email = "", $mails = 1, $verwijderd = "0")
{
if ($id == "") {
//nieuw personeel
parent::__construct($id, $gebruikersnaam, $voornaam, $achternaam, $laatsteOnline, $email);
$this->verwijderd = $verwijderd;
$this->mails = $mails;
if (self::isInPersoneelDatabase($this->id)) {
self::setVerwijderd(0);
self::setMails($this->mails);
self::save();
} else {
echo "ik ga personeel toevoegen aan de databank";
$statement = $this->db->prepare("INSERT INTO personeel (userId, mails, verwijderd) VALUES (?, ?, ?)");
echo $this->db->error;
$statement->bind_param('iii', $this->id, $this->mails, $this->verwijderd);
$statement->execute();
$statement->close();
}
} else {
if (!is_numeric($id)) {
throw new BadParameterException();
}
parent::__construct($id);
$this->db = DB::getDB();
$statement = $this->db->prepare("SELECT verwijderd, mails FROM personeel WHERE userId = ?");
$statement->bind_param('i', $id);
$statement->execute();
$statement->store_result();
$statement->bind_result($this->verwijderd, $this->mails);
$statement->fetch();
$statement->close();
}
$this->updated = 0;
}
示例8: __construct
public function __construct($name, $login, $password, $role)
{
parent::__construct($name, $login, $password);
$this->role = $role;
++self::$Count;
--parent::$Count;
}
示例9:
function __construct($failed = false)
{
parent::__construct();
if (!$failed) {
$this->uid = $this->authorize_cookie();
}
}
示例10:
function __construct($n, $l, $p, $r)
{
++self::$cntSUser;
parent::__construct($n, $l, $p);
$this->role = $r;
parent::$cntUser--;
}
示例11: __construct
public function __construct($email, $password, $key)
{
parent::__construct($email, $password);
if ($key != 'AUTOR_DE_PLATZI') {
throw new \InvalidArgumentException("Invalid key given");
}
}
示例12: __construct
/**
* UserAsCustomer constructor.
*/
public function __construct($user_id, $email, $password)
{
parent::__construct($user_id, $email, $password);
$this->orders = array();
/*ideiglenesen mert ez egy picitt bonyolult lesz*/
$this->cart = $this->loadCart();
$this->actualOrder = null;
}
示例13: __construct
/**
* Constructeur
*
* @param string $data
* @param int $meanOfLogin
* @param string $pass
* @param string $ip[optional]
* @param int $noPass[optional] 1 si connexion sans mot de passe (badgeage simple au foyer)
* @param int $poi_id
*/
public final function __construct($data, $meanOfLogin, $pass, $ip = 0, $noPass = 0, $poi_id)
{
parent::__construct($data, $meanOfLogin, $pass, $ip, $noPass);
$this->poi_id = $poi_id;
if ($this->getState() == 1) {
$this->state = $this->isAllowedOnPoint($this->poi_id);
}
}
示例14:
function __construct($name, $login, $password, $role)
{
//конструктор
parent::__construct($name, $login, $password);
$this->role = $role;
self::$userCount++;
parent::$userCount--;
}
示例15: __construct
/**
* Constructor.
*
* @param CentralAuthenticationStore $cas Shared instance of the credentials store
* @param LoggerInterface $logger Shared instance of a Logger class.
* @param Curl $curl Shared instance of the Curl class.
*/
public function __construct($cas, $logger, $curl)
{
parent::__construct($cas, $logger, $curl);
$this->limit = 25;
$this->next = 0;
$this->previous = 0;
$this->fetched_user_data = FALSE;
}