本文整理汇总了PHP中WebVista_Model_ORM类的典型用法代码示例。如果您正苦于以下问题:PHP WebVista_Model_ORM类的具体用法?PHP WebVista_Model_ORM怎么用?PHP WebVista_Model_ORM使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了WebVista_Model_ORM类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: persist
public function persist()
{
if ($this->_persistMode != WebVista_Model_ORM::DELETE && (int) $this->program_order === 0) {
$this->program_order = self::maxProgramOrder($this) + 1;
}
return parent::persist();
}
示例2: persist
public function persist()
{
$db = Zend_Registry::get('dbAdapter');
$reportBaseId = (int) $this->reportBaseId;
if ($this->_persistMode == self::DELETE) {
try {
$db->delete($this->_table, 'reportBaseId = ' . $reportBaseId);
$db->delete('reportQueries', 'reportBaseId = ' . $reportBaseId);
$db->delete('reportViews', 'reportBaseId = ' . $reportBaseId);
return true;
} catch (Exception $e) {
return false;
}
}
$data = $this->toArray();
unset($data['reportFilters']);
unset($data['reportQueries']);
unset($data['reportViews']);
if (strlen($data['guid']) <= 0) {
$data['guid'] = uniqid('', true);
}
if ($reportBaseId > 0) {
$ret = $db->update($this->_table, $data, 'reportBaseId = ' . $reportBaseId);
} else {
$this->reportBaseId = WebVista_Model_ORM::nextSequenceId();
$data['reportBaseId'] = $this->reportBaseId;
$ret = $db->insert($this->_table, $data);
}
return $ret;
}
示例3: getIterator
public function getIterator($dbSelect = null)
{
if ($dbSelect === null) {
return $this->_getIteratorBy(1, 1);
}
return parent::getIterator($dbSelect);
}
示例4: persist
public function persist()
{
if (!$this->dateTime || $this->dateTime == '0000-00-00 00:00:00') {
$this->dateTime = date('Y-m-d H:i:s');
}
return parent::persist();
}
示例5: persist
public function persist()
{
if (!strlen($this->guid) > 0) {
$this->guid = str_replace('-', '', NSDR::create_guid());
}
return parent::persist();
}
示例6: __construct
public function __construct()
{
parent::__construct();
$this->audit = new Audit();
$this->audit->_cascadePersist = $this->_cascadePersist;
$this->handler = new Handler();
$this->handler->_cascadePersist = $this->_cascadePersist;
}
示例7: populate
public function populate()
{
$ret = parent::populate();
$this->patient->populate();
$this->provider->populate();
$this->pharmacy->populate();
return $ret;
}
示例8: persist
public function persist()
{
$claimFileId = (int) $this->claimFileId;
if (!$claimFileId > 0) {
$this->claimFileId = $this->nextSequenceId('claimSequences');
}
return parent::persist();
}
示例9: getIterator
public function getIterator($dbSelect = null)
{
if ($dbSelect === null) {
$db = Zend_Registry::get('dbAdapter');
$dbSelect = $db->select()->from($this->_table)->where('handlerType = ?', $this->handlerType)->order('name');
}
return parent::getIterator($dbSelect);
}
示例10: __construct
public function __construct()
{
parent::__construct();
$this->building = new Building();
$this->building->_cascadePersist = false;
$this->provider = new Provider();
$this->provider->_cascadePersist = false;
}
示例11: __construct
public function __construct()
{
parent::__construct();
$this->insuranceProgram = new InsuranceProgram();
$this->insuranceProgram->_cascadePersist = $this->_cascadePersist;
$this->person = new Person();
$this->person->_cascadePersist = $this->_cascadePersist;
}
示例12: __construct
public function __construct()
{
parent::__construct();
$this->patient = new Patient();
$this->patient->_cascadePersist = $this->_cascadePersist;
$this->user = new User();
$this->user->_cascadePersist = $this->_cascadePersist;
}
示例13: Medication
function __construct()
{
parent::__construct();
$this->medication = new Medication();
$this->medication->_cascadePersist = false;
$this->refillResponse = new MedicationRefillResponse();
$this->refillResponse->_cascadePersist = false;
}
示例14: __construct
public function __construct()
{
parent::__construct();
$this->company = new Company();
$this->company->_cascadePersist = $this->_cascadePersist;
$this->address = new Address();
$this->address->_cascadePersist = $this->_cascadePersist;
}
示例15: getIterator
public function getIterator($sqlSelect = null)
{
if ($sqlSelect === null) {
$db = Zend_Registry::get('dbAdapter');
$sqlSelect = $db->select()->from($this->_table)->order('dateTime DESC');
}
return parent::getIterator($sqlSelect);
}