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


PHP tlObjectWithDB::__construct方法代码示例

本文整理汇总了PHP中tlObjectWithDB::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP tlObjectWithDB::__construct方法的具体用法?PHP tlObjectWithDB::__construct怎么用?PHP tlObjectWithDB::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在tlObjectWithDB的用法示例。


在下文中一共展示了tlObjectWithDB::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct()
 {
     $db = null;
     doDBConnect($db);
     parent::__construct($db);
     $this->object_table = $this->tables["users"];
 }
开发者ID:moraesmv,项目名称:testlink-code,代码行数:7,代码来源:APIKey.php

示例2: __construct

 /** 
  * class constructor 
  * 
  * @param resource &$db reference to database handler
  * @param integer $tplanId
  **/
 public function __construct(&$db, &$tplanId = null)
 {
     $this->db = $db;
     $this->testPlanID = $tplanId;
     // tlObjectWithDB::__construct($db);
     parent::__construct($this->db);
 }
开发者ID:CristianOspinaOspina,项目名称:testlinkpruebas,代码行数:13,代码来源:reports.class.php

示例3: __construct

 /**
  * class constructor
  * 
  * @param $db [ref] resource the database connection
  */
 function __construct(&$db)
 {
     tlObjectWithDB::__construct($db);
     $this->repositoryType = self::getType();
     $this->repositoryCompressionType = self::getCompression();
     $this->repositoryPath = self::getPathToRepository();
     $this->attachmentCfg = config_get('attachments');
 }
开发者ID:viglesiasce,项目名称:tl_RC1,代码行数:13,代码来源:tlAttachmentRepository.class.php

示例4: __construct

 /**
  * class constructor
  * 
  * @param $db [ref] resource the database connection
  */
 function __construct(&$db)
 {
     tlObjectWithDB::__construct($db);
     $this->attachmentCfg = config_get('attachments');
     $prop2init = array('type', 'compressionType', 'path');
     foreach ($prop2init as $prop) {
         $this->{$prop} = $this->attachmentCfg->repository->{$prop};
     }
 }
开发者ID:moraesmv,项目名称:testlink-code,代码行数:14,代码来源:tlAttachmentRepository.class.php

示例5:

 function assignment_mgr(&$db)
 {
     parent::__construct($db);
 }
开发者ID:tamtrong,项目名称:testlink,代码行数:4,代码来源:assignment_mgr.class.php

示例6: __construct

 /**
  * Class constructor
  *  
  * @param object [ref] $db the database connection
  * @param string $attachmentTableName the foreign key table name to store the attachments
  */
 function __construct(&$db, $attachmentTableName)
 {
     tlObjectWithDB::__construct($db);
     $this->attachmentRepository = tlAttachmentRepository::create($this->db);
     $this->attachmentTableName = $attachmentTableName;
 }
开发者ID:CristianOspinaOspina,项目名称:testlinkpruebas,代码行数:12,代码来源:object.class.php

示例7: __construct

 /**
  * @param $db database object
  * @param $tproject_id to work on. If null (default) the project in session
  *                     is used
  * DO NOT USE this kind of code is not accepted have this kind of global coupling
  * for lazy users
  */
 public function __construct(&$db, $tproject_id = null)
 {
     parent::__construct($db);
     $this->tproject_id = $tproject_id;
 }
开发者ID:moraesmv,项目名称:testlink-code,代码行数:12,代码来源:tlPlatform.class.php

示例8:

 function __construct(&$db)
 {
     parent::__construct($db);
 }
开发者ID:CristianOspinaOspina,项目名称:testlinkpruebas,代码行数:4,代码来源:assignment_mgr.class.php

示例9: __construct

 public function __construct(&$db)
 {
     parent::__construct($db);
     $this->sendto_email = config_get('tl_admin_email');
     $this->from_email = config_get('from_email');
     $this->return_path_email = config_get('return_path_email');
     // now we need to check if we have all needed configuration
     $key2check = array('sendto_email', 'from_email', 'return_path_email');
     $regex2match = config_get('validation_cfg')->user_email_valid_regex_php;
     $this->configIsOK = true;
     foreach ($key2check as $emailKey) {
         $matches = array();
         $this->{$emailKey} = trim($this->{$emailKey});
         if (is_blank($this->{$emailKey}) || !preg_match($regex2match, $this->{$emailKey}, $matches)) {
             $this->configIsOK = false;
             break;
         }
     }
 }
开发者ID:mweyamutsvene,项目名称:testlink,代码行数:19,代码来源:logger.class.php

示例10:

 /**
  * Class constructor
  * 
  * @param integer $testProjectID test Project identifier
  * @param integer $dbHandler the database connection handler
  */
 function __construct($testProjectID, &$dbHandler = null)
 {
     parent::__construct($dbHandler);
     $this->testProjectID = $testProjectID;
 }
开发者ID:CristianOspinaOspina,项目名称:testlinkpruebas,代码行数:11,代码来源:tlInventory.class.php

示例11: __construct

 /**
  *
  * @param database $dbHandler reference to database object
  */
 public function __construct(&$dbHandler)
 {
     // call to constructor of parent class tlObjectWithDB
     parent::__construct($dbHandler);
     // Here comes all initializing work: First read the config, then user input.
     // According to these inputs all filters which are not needed will not be used.
     // Then initialize and use only the remaining filters.
     $this->read_config();
     $this->init_args();
     // set filter mode to advanced or simple
     $this->advanced_filter_mode = $this->filter_mode_choice_enabled && $this->args->advanced_filter_mode && !$this->args->simple_filter_mode;
     // init button labels
     if ($this->advanced_filter_mode) {
         $label = self::SIMPLE_FILTER_BUTTON_LABEL;
         $qty = self::ADVANCED_FILTER_ITEM_QUANTITY;
     } else {
         $label = self::ADVANCED_FILTER_BUTTON_LABEL;
         $qty = self::SIMPLE_FILTER_ITEM_QUANTITY;
     }
     $this->filter_mode_button_label = lang_get($label);
     $this->filter_mode_button_name = $label;
     $this->filter_item_quantity = $qty;
     $this->init_settings();
     $this->init_filters();
 }
开发者ID:viglesiasce,项目名称:tl_RC1,代码行数:29,代码来源:tlFilterControl.class.php

示例12:

 function __construct(&$db, $type, $echoOnDestruct = false)
 {
     parent::__construct($db);
     $this->counterType = $type;
     $this->reset();
     $this->echoOnDestruct = $echoOnDestruct;
 }
开发者ID:CristianOspinaOspina,项目名称:testlinkpruebas,代码行数:7,代码来源:pagestatistics.class.php

示例13: __construct

 /**
  * Load the necessary data from execution and assignment tables and generate the
  * build result matrix by computing this data.
  * 
  * @author Andreas Simon
  * @param Database $db reference to database object
  * @param int $tplan_id Testplan ID for which the table shall be generated
  */
 public function __construct(&$db, $tplan_id)
 {
     parent::__construct($db);
     $this->labels = array('na' => lang_get('not_aplicable'));
     $res_cfg = config_get('results');
     foreach ($res_cfg['status_label_for_exec_ui'] as $status => $label) {
         $this->status_map[$status] = $res_cfg['status_code'][$status];
     }
     $this->tplan_mgr = new testplan($this->db);
     $this->tproject_mgr = new testproject($this->db);
     $this->tplan_id = is_numeric($tplan_id) ? $tplan_id : 0;
     if ($this->tplan_id) {
         $this->tplan_info = $this->tplan_mgr->get_by_id($this->tplan_id);
         $this->load_builds();
         $this->load_assigned_execution_map();
         $this->load_unassigned_execution_map();
         $this->build_results_matrix();
     }
 }
开发者ID:tamtrong,项目名称:testlink,代码行数:27,代码来源:build_progress.class.php

示例14: __construct

 public function __construct()
 {
     $db = null;
     doDBConnect($db);
     parent::__construct($db);
 }
开发者ID:tamtrong,项目名称:testlink,代码行数:6,代码来源:APIKey.php

示例15: results_overload

 /**
  * $builds_to_query = 'a' will query all build, $builds_to_query = -1 will prevent
  * most logic in constructor from executing/ executions table from being queried
  * if keyword = 0, search by keyword would not be performed
  * @author kevinlevy
  *
  * @internal Revisions:
  *      20100720 - asimon - BUGID 3406, 1508: added logic to get result counts on build level
  * 	    20090327 - amitkhullar - added parameter $latest_results to get the latest results only.	
  *      20071013 - franciscom - changes to fix MSSQL problems
  *                 $startTime = "0000-00-00 00:00:00" -> null
  *                 $endTime = "9999-01-01 00:00:00" -> null
  *
  *      20070916 - franciscom - interface changes
  */
 public function results_overload(&$db, &$tplan_mgr, $tproject_info, $tplan_info, $suitesSelected = 'all', $builds_to_query = -1, $platforms_to_query = array(ALL_PLATFORMS), $lastResult = 'a', $keywordId = 0, $owner = null, $startTime = null, $endTime = null, $executor = null, $search_notes_string = null, $linkExecutionBuild = null, &$suiteStructure = null, &$flatArray = null, &$linked_tcversions = null)
 {
     $this->resultsCfg = config_get('results');
     $this->testCaseCfg = config_get('testcase_cfg');
     $this->db = $db;
     tlObjectWithDB::__construct($db);
     $this->tplanMgr = $tplan_mgr;
     $this->map_tc_status = $this->resultsCfg['status_code'];
     // TestLink standard configuration is (at least for me)
     // not_run not available at user interface level on execution feature as choice.
     //
     // if( !isset($dummy['not_run']) )
     // {
     //     $dummy['not_run']=$this->map_tc_status['not_run'];
     // }
     // This will be used to create dynamically counters if user add new status
     foreach ($this->resultsCfg['status_label_for_exec_ui'] as $tc_status_verbose => $label) {
         $this->tc_status_for_statistics[$tc_status_verbose] = $this->map_tc_status[$tc_status_verbose];
     }
     if (!isset($this->resultsCfg['status_label_for_exec_ui']['not_run'])) {
         $this->tc_status_for_statistics['not_run'] = $this->map_tc_status['not_run'];
     }
     $this->suitesSelected = $suitesSelected;
     $this->tprojectID = $tproject_info['id'];
     $this->testCasePrefix = $tproject_info['prefix'];
     $this->testPlanID = $tplan_info['id'];
     $this->tplanName = $tplan_info['name'];
     $this->suiteStructure = $suiteStructure;
     $this->flatArray = $flatArray;
     $this->linked_tcversions = $linked_tcversions;
     // build suiteStructure and flatArray
     if ($this->suiteStructure == null && $this->flatArray == null && $this->linked_tcversions == null) {
         list($this->suiteStructure, $this->linked_tcversions) = $this->generateExecTree($db, $keywordId, $owner);
     }
     // KL - if no builds are specified, no need to execute the following block of code
     if ($builds_to_query != -1) {
         // retrieve results from executions table
         // get keyword id -> keyword name pairs used in this test plan
         $keywords_in_tplan = $tplan_mgr->get_keywords_map($this->testPlanID, 'ORDER BY keyword');
         // KL - 20061229 - this call may not be necessary for all reports
         // only those that require info on results for keywords
         // Map of test case ids to array of associated keywords
         $this->keywordData = null;
         if (!is_null($keywords_in_tplan)) {
             $this->keywordData = $this->getKeywordData(array_keys($keywords_in_tplan));
         }
         //$tplan_mgr->get_keywords_tcases($this->testPlanID);
         // get owner id -> owner name pairs used in this test plan
         $arrOwners = getUsersForHtmlOptions($db);
         // create data object which tallies last result for each test case
         // this function now also creates mapOfLastResultByKeyword ???
         // KL - 2/01/07
         // we should NOT build executions map with cases that are just pass/failed/or blocked.
         // we should always populate the executions map with all results
         // and then programmatically figure out the last result
         // if you just query the executions table for those rows with status = $this->map_tc_status['passed']
         // that is not the way to determine last result
         $all_results = $this->latest_results;
         $this->executionsMap = $this->buildExecutionsMap($builds_to_query, $platforms_to_query, 'a', $keywordId, $owner, $startTime, $endTime, $executor, $search_notes_string, $linkExecutionBuild, $all_results);
         // new dBug($this->executionsMap);
         $this->createMapOfLastResult($this->suiteStructure, $this->executionsMap, $lastResult);
         $this->aggregateKeywordResults = $this->tallyKeywordResults($this->mapOfLastResultByKeyword, $keywords_in_tplan);
         $this->aggregateOwnerResults = $this->tallyOwnerResults($this->mapOfLastResultByOwner, $arrOwners);
         // create data object which tallies totals for individual suites
         // child suites are NOT taken into account in this step
         $this->createMapOfSuiteSummary($this->mapOfLastResult);
         // create data object which tallies totals for suites taking
         // child suites into account
         $this->createAggregateMap($this->suiteStructure, $this->mapOfSuiteSummary);
         $this->totalsForPlan = $this->createTotalsForPlan($this->suiteStructure);
         // must be done after totalsForPlan is performed because the total # of cases is needed
         // BUGID 3682
         $arrBuilds = $tplan_mgr->get_builds($this->testPlanID, testplan::GET_ACTIVE_BUILD);
         // BUGID 3406, BUGID 1508 - we need the totals per build here, not for the whole plan anymore
         $this->totalsForBuilds = $this->createTotalsForBuilds($arrBuilds);
         $this->aggregateBuildResults = $this->tallyBuildResults($this->mapOfLastResultByBuild, $arrBuilds, $this->totalsForBuilds);
     }
     // end if block
 }
开发者ID:moraesmv,项目名称:testlink-code,代码行数:94,代码来源:results.class.php


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