當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Person::__construct方法代碼示例

本文整理匯總了PHP中Person::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Person::__construct方法的具體用法?PHP Person::__construct怎麽用?PHP Person::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Person的用法示例。


在下文中一共展示了Person::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 public function __construct($id, $firstName, $lastName, $email, $mobileNum, $ci, $credits, $major)
 {
     parent::__construct($id, $firstName, $lastName, $email, $mobileNum);
     $this->setCi($ci);
     $this->setCredits($credits);
     $this->setMajor($major);
 }
開發者ID:sass-team,項目名稱:sass-app,代碼行數:7,代碼來源:Student.class.php

示例2: __construct

 public function __construct($parent_name, $parent_gender, $parent_music, $num, $sal)
 {
     parent::__construct($parent_name, $parent_gender, $parent_music);
     $this->phone_number = $num;
     $this->salary = $sal;
     $this->clients = array();
 }
開發者ID:simonaTsenova,項目名稱:homeworks-OOP,代碼行數:7,代碼來源:Bartender.php

示例3:

 function __construct($id = 0)
 {
     if ($id == $GLOBALS['user_system']->getCurrentUser('id')) {
         $this->_save_permission_level = 0;
     }
     return parent::__construct($id);
 }
開發者ID:howardgrigg,項目名稱:jethro-pmm,代碼行數:7,代碼來源:staff_member.class.php

示例4: __construct

 /**
  * Student constructor.
  * @param bool $dual
  */
 public function __construct($dual = null)
 {
     parent::__construct();
     if ($dual != null) {
         $this->dual = $dual;
     }
 }
開發者ID:Germangalia,項目名稱:School,代碼行數:11,代碼來源:Student.php

示例5: __construct

 public function __construct($vars = null)
 {
     $this->ci =& get_instance();
     parent::__construct($vars);
     $this->init($vars);
     $this->ci->load->helper('explode_ids');
 }
開發者ID:jpasosa,項目名稱:global,代碼行數:7,代碼來源:usuario.php

示例6: __construct

 public function __construct($name, $age, $isMale, $score)
 {
     parent::__construct($name, $age, $isMale);
     if ($score >= 2 && $score <= 6) {
         $this->score = $score;
     }
 }
開發者ID:yoannamiteva,項目名稱:it_talents,代碼行數:7,代碼來源:Student.php

示例7: __construct

 public function __construct($name, $age, $location = 'Texas')
 {
     parent::__construct($name, $age, $location);
     //        $this->name = $name;
     //        $this->age = $age;
     //        $this->location = $location;
 }
開發者ID:sameg14,項目名稱:PHPMastery,代碼行數:7,代碼來源:in_class_coding.php

示例8: __construct

 public function __construct()
 {
     parent::__construct();
     $this->setupCustomFields('Users');
     $this->disable_row_level_security = true;
     $this->emailAddress = BeanFactory::getBean('EmailAddresses');
 }
開發者ID:jglaine,項目名稱:sugar761-ent,代碼行數:7,代碼來源:Employee.php

示例9: __construct

 public function __construct($newFirstName, $newLastName, $newAge, $newGender, $newSalary, $newDept)
 {
     parent::__construct($newFirstName, $newLastName, $newAge, $newGender);
     $this->empId = Employee::$employeeId;
     $this->setSalary($newSalary);
     $this->setDept($newDept);
     Employee::$employeeId++;
 }
開發者ID:spiritman1990,項目名稱:pdt,代碼行數:8,代碼來源:Employee.php

示例10: __construct

 public function __construct($lastname, $firstname, $patro, $skills)
 {
     parent::__construct($lastname, $firstname, $patro);
     $this->{$skills} = $skills;
     //        var_dump($this->$uid) так нельзя
     var_dump($person->{$skills});
     var_dump($person->{$forTest});
 }
開發者ID:itmo-it-group-305,項目名稱:sergey.poliakov-blog,代碼行數:8,代碼來源:oop.php

示例11: __construct

 public function __construct($newFirstName, $newLastName, $newAge, $newGender, $newCreditType, $newCardNum)
 {
     parent::__construct($newFirstName, $newLastName, $newAge, $newGender);
     $this->custId = Customer::$customerId;
     $this->setCreditType($newCreditType);
     $this->setCardNum($newCardNum);
     Customer::$customerId++;
 }
開發者ID:spiritman1990,項目名稱:pdt,代碼行數:8,代碼來源:Customer.php

示例12: __construct

 /**
  * Student constructor.
  * @param $name
  * @param $age
  * @param $isMale
  * @param $score
  */
 public function __construct($name, $age, $isMale, $score)
 {
     parent::__construct($name, $age, $isMale);
     if ($score > 6 || $score < 2) {
         throw new InvalidArgumentException('Score must be between 2 and 6');
     }
     $this->score = $score;
 }
開發者ID:gpichurov,項目名稱:ittalents_season5,代碼行數:15,代碼來源:Student.php

示例13: __construct

 public function __construct($employee_id = "", $basic_info = NULL, $salary = 0, $role_id = 1, $CMND = "")
 {
     //call parent to construct
     parent::__construct($employee_id, $basic_info);
     $this->salary = $salary;
     $this->role_id = $role_id;
     $this->CMND = $CMND;
     $this->object_type = "Employee";
 }
開發者ID:Ruyka,項目名稱:Tam-An-Food-Store-Manager,代碼行數:9,代碼來源:Employee.php

示例14: __construct

 /**
  * Konstruktor
  */
 public function __construct()
 {
     parent::__construct();
     $this->setStrength(6);
     $this->setDexterity(6);
     $this->setVitality(12);
     $this->setVitalityMax(18);
     $this->setSpeed(12);
 }
開發者ID:Ranmus,項目名稱:CDV-Combat,代碼行數:12,代碼來源:Witcher.php

示例15: __construct

 /**
  * Constructor
  * @param $id
  * @param $firstName
  * @param $lastName
  * @param $email
  * @param $mobileNum
  * @param $avatarImgLoc
  * @param $profileDescription
  * @param $dateAccountCreated
  * @param $userType
  * @param $accountActiveStatus
  * @internal param $database
  */
 public function __construct($id, $firstName, $lastName, $email, $mobileNum, $avatarImgLoc, $profileDescription, $dateAccountCreated, $userType, $accountActiveStatus)
 {
     parent::__construct($id, $firstName, $lastName, $email, $mobileNum);
     $this->setAvatarImgLoc($avatarImgLoc);
     $this->setProfileDescription($profileDescription);
     $this->setDateAccountCreated($dateAccountCreated);
     $this->setUserType($userType);
     $this->setActive($accountActiveStatus);
 }
開發者ID:sass-team,項目名稱:sass-app,代碼行數:23,代碼來源:User.class.php


注:本文中的Person::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。