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


PHP User::__construct方法代码示例

本文整理汇总了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();
     }
 }
开发者ID:swat30,项目名称:safeballot,代码行数:10,代码来源:UserTest.php

示例2: __construct

 public function __construct($id, $mail, $name, $description, $skLeague)
 {
     parent::__construct($id, $mail);
     $this->name = $name;
     $this->description = $description;
     $this->skLeague = $skLeague;
 }
开发者ID:Chaos-TIS,项目名称:letna-liga,代码行数:7,代码来源:Team.php

示例3:

 function __construct($uname = null)
 {
     parent::__construct();
     $this->page_error = "";
     $this->setLoginTemplates();
     $this->scriptspresent = FALSE;
 }
开发者ID:abhipil,项目名称:hoods,代码行数:7,代码来源:login_model.php

示例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);
 }
开发者ID:energine-cmf,项目名称:energine,代码行数:15,代码来源:AuthUser.php

示例5: __construct

 public function __construct($name, $email)
 {
     $this->_date = "11-01-1996";
     $this->_type = "Viewer";
     $this->_level = 1;
     parent::__construct($name, $email);
 }
开发者ID:idrisdopico,项目名称:bap,代码行数:7,代码来源:Viewer.php

示例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"];
     }
 }
开发者ID:newmen,项目名称:vedro,代码行数:34,代码来源:system_user.php

示例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;
 }
开发者ID:BackupTheBerlios,项目名称:repair-svn,代码行数:35,代码来源:Personeel.class.php

示例8: __construct

 public function __construct($name, $login, $password, $role)
 {
     parent::__construct($name, $login, $password);
     $this->role = $role;
     ++self::$Count;
     --parent::$Count;
 }
开发者ID:kapsilon,项目名称:Specialist,代码行数:7,代码来源:SuperUser.class.php

示例9:

 function __construct($failed = false)
 {
     parent::__construct();
     if (!$failed) {
         $this->uid = $this->authorize_cookie();
     }
 }
开发者ID:rasstroen,项目名称:sosedi,代码行数:7,代码来源:CurrentUser.php

示例10:

 function __construct($n, $l, $p, $r)
 {
     ++self::$cntSUser;
     parent::__construct($n, $l, $p);
     $this->role = $r;
     parent::$cntUser--;
 }
开发者ID:bz4work,项目名称:spec3,代码行数:7,代码来源:SuperUser.class.php

示例11: __construct

 public function __construct($email, $password, $key)
 {
     parent::__construct($email, $password);
     if ($key != 'AUTOR_DE_PLATZI') {
         throw new \InvalidArgumentException("Invalid key given");
     }
 }
开发者ID:takito007,项目名称:PHP-LARAVEL,代码行数:7,代码来源:Author.php

示例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;
 }
开发者ID:kubu1518,项目名称:rftCandyShop,代码行数:11,代码来源:UserAsCustomer.php

示例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);
     }
 }
开发者ID:buckutt,项目名称:Archives,代码行数:18,代码来源:Seller.class.php

示例14:

 function __construct($name, $login, $password, $role)
 {
     //конструктор
     parent::__construct($name, $login, $password);
     $this->role = $role;
     self::$userCount++;
     parent::$userCount--;
 }
开发者ID:Nifler,项目名称:OOP,代码行数:8,代码来源:SuperUser.class.php

示例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;
 }
开发者ID:rubendgr,项目名称:lunr,代码行数:15,代码来源:Feed.php


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