本文整理汇总了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');
}
示例2: CodendiUpgrade
function CodendiUpgrade()
{
$this->_upgradeError = null;
$this->setEnvironment();
$da =& CodendiDataAccess::instance();
parent::DataAccessObject($da);
}
示例3: __construct
public function __construct()
{
parent::__construct();
$this->tabela = 'tb_vaga_garagem';
$this->primaryKey = 'cd_vaga';
$this->dataTransfer = 'VagaGaragemDTO';
}
示例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);
}
}
示例5: get
public function get($id)
{
$vo = parent::get($id);
if (is_object($vo)) {
$vo->class = $vo->class_name;
}
return $vo;
}
示例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;
}
示例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;
}
示例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);
}
示例9:
function __construct()
{
parent::__construct();
$this->table_name = 'tracker_perm';
}
示例10: __construct
public function __construct()
{
parent::__construct();
$this->table_name = 'tracker_artifact';
}
示例11: __construct
public function __construct($da = null)
{
parent::__construct($da);
$this->table_name = 'groups';
}