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


PHP Company::__construct方法代碼示例

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


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

示例1: __construct

 public function __construct($qid)
 {
     include '../helpers/db_new.inc.php';
     $sql = 'SELECT
                     fullname
                     ,shortname
                     ,englishname
                     ,acronym
                     ,exchid
                     ,companyid
                     ,privileged
                 FROM quotes
                 WHERE qid = :qid AND ActiveFlag = 1';
     try {
         $stmt = $pdo->prepare($sql);
         $stmt->bindParam(':qid', $qid);
         $stmt->execute();
     } catch (PDOException $e) {
         $error = $e->getMessage();
         $redirect = '../error.html.php';
         header("Location: {$redirect}");
         exit;
     }
     $row = $stmt->fetch();
     if ($row) {
         parent::__construct($row['companyid']);
         $this->_qid = $qid;
         $this->_quoteName = $row['fullname'];
         $this->_quoteShortName = $row['shortname'];
         $this->_englishName = $row['englishname'];
         $this->_acronym = $row['acronym'];
         $this->_exchid = $row['exchid'];
         $this->_privileged = $row['privileged'];
     }
 }
開發者ID:soanni,項目名稱:stocks_oop,代碼行數:35,代碼來源:Quote.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     $this->setupCustomFields('Accounts');
     foreach ($this->field_defs as $field) {
         if (isset($field['name'])) {
             $this->field_name_map[$field['name']] = $field;
         }
     }
     //Email logic
     if (!empty($_REQUEST['parent_id']) && !empty($_REQUEST['parent_type']) && $_REQUEST['parent_type'] == 'Emails' && !empty($_REQUEST['return_module']) && $_REQUEST['return_module'] == 'Emails') {
         $_REQUEST['parent_name'] = '';
         $_REQUEST['parent_id'] = '';
     }
 }
開發者ID:sacredwebsite,項目名稱:SuiteCRM,代碼行數:15,代碼來源:Account.php

示例3: __construct

 /**
  * @brief Constructor
  *
  * @note  It's allowed to create an object with the ID 0 (for the root element).
  *
  * @param Database  &$database      reference to the Database-object
  * @param User      &$current_user  reference to the current user which is logged in
  * @param Log       &$log           reference to the Log-object
  * @param integer   $id             ID of the manufacturer we want to get
  *
  * @throws Exception    if there is no such manufacturer in the database
  * @throws Exception    if there was an error
  */
 public function __construct(&$database, &$current_user, &$log, $id)
 {
     parent::__construct($database, $current_user, $log, 'manufacturers', $id);
 }
開發者ID:AlexanderS,項目名稱:Part-DB,代碼行數:17,代碼來源:class.Manufacturer.php

示例4: unset

 function __construct()
 {
     parent::__construct();
     $this->getField('accountnumber')->dropnotnull();
     unset($this->_autohandlers['accountnumber']);
 }
開發者ID:uzerpllp,項目名稱:uzerp,代碼行數:6,代碼來源:Lead.php

示例5:

 function __construct()
 {
     parent::__construct();
 }
開發者ID:daniel-samson,項目名稱:suite-development-kit,代碼行數:4,代碼來源:My_Custom_Company.php

示例6: __construct

 public function __construct()
 {
     parent::__construct();
     global $current_user;
     if (!empty($current_user)) {
         $this->team_id = $current_user->default_team;
         //default_team is a team id
     } else {
         $this->team_id = 1;
         // make the item globally accessible
     }
     //Email logic
     if (!empty($_REQUEST['parent_id']) && !empty($_REQUEST['parent_type']) && $_REQUEST['parent_type'] == 'Emails' && !empty($_REQUEST['return_module']) && $_REQUEST['return_module'] == 'Emails') {
         $_REQUEST['parent_name'] = '';
         $_REQUEST['parent_id'] = '';
     }
 }
開發者ID:jglaine,項目名稱:sugar761-ent,代碼行數:17,代碼來源:Account.php


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