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


PHP DataAccessObject類代碼示例

本文整理匯總了PHP中DataAccessObject的典型用法代碼示例。如果您正苦於以下問題:PHP DataAccessObject類的具體用法?PHP DataAccessObject怎麽用?PHP DataAccessObject使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: testDao

 function testDao()
 {
     $da = new MockDataAccess($this);
     $dar = new MockDataAccessResult($this);
     $da->setReturnReference('query', $dar);
     $dao = new DataAccessObject($da);
     $result = $dao->retrieve("SELECT *");
     $this->assertIsA($result, 'MockDataAccessResult');
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:9,代碼來源:DataAccessObjectTest.php

示例2: CodendiUpgrade

 function CodendiUpgrade()
 {
     $this->_upgradeError = null;
     $this->setEnvironment();
     $da =& CodendiDataAccess::instance();
     parent::DataAccessObject($da);
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:7,代碼來源:CodendiUpgrade.class.php

示例3: __construct

 public function __construct()
 {
     parent::__construct();
     $this->tabela = 'tb_vaga_garagem';
     $this->primaryKey = 'cd_vaga';
     $this->dataTransfer = 'VagaGaragemDTO';
 }
開發者ID:dnaCRM,項目名稱:dnaCRM,代碼行數:7,代碼來源:VagaGaragemDAO.php

示例4:

 /**
  * Constructor of the class
  *
  * @param DataAccess $da      Data access details
  * @param Integer    $groupId Project Id
  *
  * @return void
  */
 function __construct(DataAccess $da, $groupId = null)
 {
     parent::__construct($da);
     if ($groupId) {
         $this->groupFilter = ' AND group_id=' . $this->da->escapeInt($groupId);
     }
 }
開發者ID:nterray,項目名稱:tuleap,代碼行數:15,代碼來源:Statistics_ScmSvnDao.class.php

示例5: get

 public function get($id)
 {
     $vo = parent::get($id);
     if (is_object($vo)) {
         $vo->class = $vo->class_name;
     }
     return $vo;
 }
開發者ID:reillo,項目名稱:ninjawars,代碼行數:8,代碼來源:SkillDAO.class.php

示例6: __construct

 public function __construct()
 {
     parent::__construct();
     $this->tabela = 'tb_pessoa_juridica';
     $this->primaryKey = 'cd_pessoa_juridica';
     $this->dataTransfer = 'PessoaJuridicaDTO';
     $this->colunaImagem = 'im_perfil';
     $this->imgFolder = IMG_UPLOADS_FOLDER . "{$this->tabela}/";
     $this->fotoDefault = ICON_PESSOA_JURIDICA;
 }
開發者ID:dnaCRM,項目名稱:dnaCRM,代碼行數:10,代碼來源:PessoaJuridicaDAO.php

示例7: __construct

 public function __construct()
 {
     parent::__construct();
     $this->tabela = 'tb_condominio';
     $this->primaryKey = 'cd_condominio';
     $this->dataTransfer = 'CondominioDTO';
     $this->colunaImagem = 'im_perfil';
     $this->imgFolder = IMG_UPLOADS_FOLDER . "{$this->tabela}/";
     $this->fotoDefault = ICON_USER;
 }
開發者ID:dnaCRM,項目名稱:dnaCRM,代碼行數:10,代碼來源:CondominioDAO.php

示例8: save

 public function save(ValueObject $vo)
 {
     if (empty($vo)) {
         return false;
     }
     $vo2 = clone $vo;
     // Make cloned copy of the vo
     // Have to unset joined class data, though not the _foreign keys, I guess.
     unset($vo2->identity);
     unset($vo2->class_name);
     unset($vo2->theme);
     parent::save($vo2);
 }
開發者ID:reillo,項目名稱:ninjawars,代碼行數:13,代碼來源:PlayerDAO.class.php

示例9:

 function __construct()
 {
     parent::__construct();
     $this->table_name = 'tracker_perm';
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:5,代碼來源:Tracker_PermDao.class.php

示例10: __construct

 public function __construct()
 {
     parent::__construct();
     $this->table_name = 'tracker_artifact';
 }
開發者ID:amanikamail,項目名稱:tuleap,代碼行數:5,代碼來源:Tracker_ArtifactDao.class.php

示例11: __construct

 public function __construct($da = null)
 {
     parent::__construct($da);
     $this->table_name = 'groups';
 }
開發者ID:uniteddiversity,項目名稱:tuleap,代碼行數:5,代碼來源:ProjectDao.class.php


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