本文整理汇总了PHP中DAL类的典型用法代码示例。如果您正苦于以下问题:PHP DAL类的具体用法?PHP DAL怎么用?PHP DAL使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了DAL类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: soapServer
public function soapServer($request, $response)
{/*{{{*/
$postdata = file_get_contents("php://input");
$function = 'soapServer';
$this->ioLogRecorder->addLog(XDateTime::now()->toString()." service [{$function}] ".$this->ioLogRecorder->format2SimpleLog($postdata));
$configs = ProviderConfigFactory::getProviderAppConfigs(PhoneConference::SPTYPE_HUAWEI, TeleConfProvider::APPTYPE_CONF);
$callbackUrl = $configs['callbackUrl'];
$server = new SoapServer(null, array('uri' => 'HuaweiConfCallback','location'=>$callbackUrl));
$server->setClass('HuaweiTeleConfApi');
try
{
$lockName = $this->getLockerName($postdata);
$cacher= DAL::get()->getCache(Cacher::CACHETYPE_LOCKER);
$locker = LockUtil::factory(LockUtil::LOCK_TYPE_MEMCACHE, array('memcache' => $cacher));
$locker->getLock($lockName);
$server->handle();
$locker->releaseLock($lockName);
}
catch(Exception $ex)
{
$locker->releaseLock($lockName);
}
header("HTTP/1.1 202 Accepted");
header("Content-Type: text/xml;charset=UTF-8");
return parent::DIRECT_OUTPUT;
}/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:26,代码来源:huaweiconfcallbackcontroller.php
示例2: setAmbiente
private function setAmbiente($tipo = '')
{
$registrador = new DAL();
$idTipo = $registrador->getTipoDato($tipo, 'id', 'id');
if (!$idTipo) {
return false;
}
$idTipo = $idTipo;
$nombreTipo = $registrador->getTipoDato($tipo, 'id', 'nombre');
$aliasTipo = $registrador->getTipoDato($tipo, 'id', 'alias');
unset($registrador);
return array("id" => $idTipo, "nombre" => $nombreTipo, "alias" => $aliasTipo);
}
开发者ID:fernandoceli,项目名称:polux_desarrollo,代码行数:13,代码来源:Rango.class.php
示例3: query1
function query1($disorder)
{
echo "jaz sem funkcija";
$dal = new DAL();
$age_min = 18;
$age_max = 36;
$unitarray = array(75, 77, 78);
$disorderarray = array(1, 2, 3, 4, 5);
$cat = $dal->get_count_dissorder_age_persons_by_unit($unit_in, 0, 11, $age_min, $age_max, $disorder);
$cat = $cat[0];
$table = str_replace("##DISORDER{$disorder}##", $cat->sestevek, $table);
echo $table;
return $table;
}
开发者ID:urki,项目名称:urki-test-project,代码行数:14,代码来源:view_year_reposrt_NEDELA.php
示例4: getUserIdByPatientAttachment
private function getUserIdByPatientAttachment($context)
{/*{{{*/
$encodeId = $context->request->id;
$patientAttachmentId = Codec::getInstance()->decodeId($encodeId);
$patientAttachment = DAL::get()->find('patientattachment',$patientAttachmentId);
return $patientAttachment->user->id;
}/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:7,代码来源:patientattachinterceptor.php
示例5: getDtoInfos
public static function getDtoInfos(array $tasks)
{
/*{{{*/
$dtoList = array();
foreach ($tasks as $task) {
$patient = $task->patient;
//$ticket = DAL::get()->find_by_source('ticket', $task, true);
$ticket = DAL::get()->find_waiting_ticket('ticket', $task);
if ($ticket->isNull()) {
continue;
}
if (false == isset($dtoList[$patient->user->id])) {
$dtoList[$patient->user->id] = array();
}
$dto = new self();
$dto->id = $ticket->source->id;
$dto->ticketId = $ticket->id;
$dto->ctime = $ticket->ctime;
$dto->inspectorName = $task->inspector->isNull() ? '╬┤ио┼С' : $task->inspector->getRealName();
$dto->patient = $patient;
$dto->level = $task->level;
$dto->source = $task;
$dto->inspectorId = $ticket->inspectorId;
$dto->status = $task->getStatusDesc();
$dto->src = $task->getSrcDesc();
$dto->comment = $task->comment;
$dto->proposal = $task->proposal;
$dtoList[$patient->user->id][] = $dto;
}
return $dtoList;
}
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:31,代码来源:taskpreparedto.php
示例6: showAdd
public function showAdd($request, $response)
{
/*{{{*/
$response->id = $request->getRequest('id', 0);
$response->msg = $request->msg;
$response->noteBook = DAL::get()->find('NoteBook', $response->id);
}
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:7,代码来源:notebookcontroller.php
示例7: show
public function show($request, $response)
{
/*{{{*/
$response->cates = $this->threadCateClient->getTopLevelList();
$response->auditor = DAL::get()->find('auditor', $request->id);
$res = $this->auditorClient->getByRoles(array(Auditor::ROLE_LEADER));
$response->leaders = isset($res[Auditor::ROLE_LEADER]) ? $res[Auditor::ROLE_LEADER] : array();
$response->groups = DAL::get()->find_all_by_condition('auditorgroup', '1=1');
$response->id = $request->id;
$response->showContent = true;
$response->viewer = $this->auditor;
if (null == $response->id) {
$isGroupLeader = false;
if ($this->auditor->isLeader()) {
foreach ($response->groups as $group) {
if ($group->leader->id == $this->auditor->id) {
$isGroupLeader = true;
}
}
if (false == $isGroupLeader) {
throw new BizException('你还不是任何组的组长,请联系管理员设置');
}
}
}
}
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:25,代码来源:auditorcontroller.php
示例8: searchBySphinx
private function searchBySphinx($request, $response, $kw, $p)
{/*{{{*/
$doctorSearchd = SphinxSearchdBase::createSearchdByType('Doctor');
$utf8Kw = mb_convert_encoding($kw, 'utf-8', 'gbk');
$res = $doctorSearchd->query($utf8Kw, ($p - 1) * 15, 15);
$searchResult = SearchResult::sphinxResult2searchResult($res, 'doctor', ($p - 1) * 15, 15);
$response->totalPage = ceil($searchResult->total_found/$searchResult->pageSize);
$results = array();
foreach($searchResult->items as $item)
{/*{{{*/
$doctor = DAL::get()->find('doctor',$item->id);
if($doctor->isNull() || $doctor->deleted > 0 )
{
continue;
}
$result = array();
$result['id'] = $doctor->id;
$result['name'] = $doctor->name;
$result['title'] = $doctor->title;
$result['hospital'] = $doctor->hospitalfaculty->hospital->name;
$result['userid'] = $doctor->getUserId();
$result['hospitalfacultyname'] = $doctor->hospitalfaculty->name ;
$results[] = (object)$result;
}/*}}}*/
return $results;
}/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:29,代码来源:userdoctorcontroller.php
示例9: service
public function service($request, $response)
{/*{{{*/
ob_start();
$result = "";
$function = $request->service;
if(method_exists($this, $function))
{
try
{
$lockName = $this->getLockerName($request);
$cacher= DAL::get()->getCache(Cacher::CACHETYPE_LOCKER);
$locker = LockUtil::factory(LockUtil::LOCK_TYPE_MEMCACHE, array('memcache' => $cacher));
$locker->getLock($lockName);
$result = $this->$function($request,$response);
$locker->releaseLock($lockName);
}
catch(LockException $ex)
{
$this->ioLogRecorder->addLog(XDateTime::now()->toString()."并发锁错误 $lockName\n");
}
catch(Exception $ex)
{
$locker->releaseLock($lockName);
}
}
echo $result;
header('Content-Length: ' . ob_get_length());
return parent::DIRECT_OUTPUT;
}/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:29,代码来源:teleconfcallbackcontroller.php
示例10: checkNotice
/**
* checkNotice 接收来自第三方的电话咨询订单验证消息
*
* @access public
* @return void
*/
public function checkNotice()
{/*{{{*/
$data = file_get_contents("php://input");
if(empty($data))
{
echo json_encode(array('errno' => 2, 'detail' => iconv("GBK", "UTF-8", '数据为空')));
exit;
}
$arrData = json_decode($data, true);
$type = $arrData['type'];
$postData = $arrData['postdata'];
$partnerTelOrder = DAL::get()->find_by_tradeid('partnertelorder', $postData['trade_id']);
if(false == $partnerTelOrder->isNull())
{
$telOrder = DAL::get()->find('telorder', $partnerTelOrder->orderId);
if(false == $telOrder->isNull())
{
if(($type == '2' && $telOrder->isRefund()) || ($type == '1' && $telOrder->isFinished()))
{
echo json_encode(array('errno'=>'0'));
ScoreClient::getInstance()->createIntegralLog(User::ADMIN_USERID, $partnerTelOrder->tradeId, IntegralLog::BAIDUZHIDAO_PHONE_DRAWBACK_SUCCESS);
exit;
}
}
}
echo json_encode(array('errno'=>'1'));
ScoreClient::getInstance()->createIntegralLog(User::ADMIN_USERID, $partnerTelOrder->tradeId, IntegralLog::BAIDUZHIDAO_PHONE_DRAWBACK_FAIL);
exit;
}/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:35,代码来源:partnertelordercontroller.php
示例11: newPost
public function newPost($request, $response)
{
/*{{{*/
$verifyOk = Captcha::verify($request->verifyStr, XIpLocation::getIp(), 'article', $request->article_id, $request->token);
DBC::requireTrue($verifyOk, "您输入的验证码有误!");
//禁用词检查
$title = $request->title;
$result = DoctorClient::getInstance()->getProfanityCheck($title);
DBC::requireFalse($result['CODE'] < 0, "文章 评论添加失败");
DBC::requireFalse($result['CODE'] == 2, "文章 评论添加成功");
$title = $result['CONTENT'];
$content = htmlspecialchars($request->getRequest('content'), ENT_COMPAT | ENT_HTML401, 'ISO-8859-1');
$result = DoctorClient::getInstance()->getProfanityCheck($content);
DBC::requireFalse($result['CODE'] < 0, "文章 评论添加失败");
DBC::requireFalse($result['CODE'] == 2, "文章 评论添加成功");
$content = $result['CONTENT'];
$article = DAL::get()->find('article', $request->article_id);
$feilds = array();
$feilds['ip'] = XIpLocation::getIp();
$feilds['ipLocation'] = XIpLocation::getLocationArea();
$userId = $this->user->isNull() == false ? $this->user->id : '';
$comment = ArticleClient::getInstance()->addComment($article, $userId, $title, $content, $feilds);
squid::clean($article->getUrl(), true);
$this->message('您发表的评论已经提交,待网站审核通过后即可展示。', $response);
}
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:25,代码来源:articlecommentcontroller.php
示例12: modify
function modify($request, $response)
{
/*{{{*/
$this->myProjectOperator->checkAdminAuthOrQuit('update');
$projectOrgId = $request->projectOrgId;
$response->projectOrg = DAL::get()->find('projectOrg', $projectOrgId);
}
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:7,代码来源:projectorgmgrcontroller.php
示例13: detail
public function detail($request, $response)
{/*{{{*/
$threadId = (int)$request->case_id;
$criticalNum = 100*100*1000;
$correctNum = 100*100*100;
$threadId = $threadId > $criticalNum ? $threadId : $threadId-$correctNum;
$proposal = DAL::get()->find('proposal', $threadId);
if(false == $proposal->isNull())
{
$response->setRedirect($proposal->getTouchUrl());
return 0;
}
else
{
$intention = DAL::get()->find('intention', $threadId);
if(false == $intention->isNull())
{
$response->setRedirect($intention->getTouchUrl());
return 0;
}
else
{
DBC::requireTrue(false, 'Êý¾ÝÎÊÌâ');
}
}
}/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:27,代码来源:threadcontroller.php
示例14: postTopic
public function postTopic($request, $response)
{
$groupIds = $request->groupIds;
if(!$groupIds)
{
$response->message = '没有选择话题所在的组!';
MsgHtml::msg($response->message, 'http://'.URL_PREFIX.'passport.haodf.com/mypatient/post', array('delay' => 6, 'button' => 'back'));
return false;
}
$title = $request->title;
$content = preg_replace("/<\/?a[^>]*>/i", "", $request->content);
if(XString::cntrim($title) == '' || XString::cntrim($content) == '')
{
$response->message = '话题标题和内容都不能为空!';
MsgHtml::msg($response->message, 'http://'.URL_PREFIX.'passport.haodf.com/mypatient/post', array('delay' => 6, 'button' => 'back'));
return false;
}
$groups = DAL::get()->find('regroup', $groupIds);
foreach($groups as $group)
{
if($group->reboard->isNull() == false)
{
$member = ForumClient::getInstance()->getMemberByUserIdAndGroupId($this->user->id, $group->id);
if($member->isNull() == false && $member->isForbiddened())
{
$response->message = '您的发言没有成功,可能是已被禁止发言!服务电话:'.HdfPhoneNumber::PHONE_FENZHEN;
MsgHtml::msg($response->message, 'http://'.URL_PREFIX.'passport.haodf.com/mypatient/index', array('delay' => 6, 'button' => 'back'));
return false;
}
ResidentEvilClient::getInstance()->createTopic($group->space, $group->reboard, $this->user, $title, $content);
}
}
$response->message = '话题发表成功!';
MsgHtml::msg($response->message, 'http://'.URL_PREFIX.'passport.haodf.com/mypatient/index', array('delay' => 6, 'button' => 'back'));
}
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:35,代码来源:mypatientcontroller.php
示例15: buildData
private function buildData($facultyList)
{/*{{{*/
$res = array();
$facultyData = array();
if(false == empty($facultyList))
{
$facultys = DAL::get()->find('Faculty', $facultyList['ids']);
foreach($facultys as $faculty)
{
$hospitalFacultyGroup = $this->getHospitalFacultyGroupByFacultyId($faculty->id);
if(count($hospitalFacultyGroup) == 5)
{
$formData = $this->buildFormData($hospitalFacultyGroup, $faculty->id);
$facultyNames = $this->getAllNames($faculty);
if (count($facultyNames)>1)
{
foreach ($facultyNames as $facultyName)
{
$res[] = $this->getRealData($faculty, $formData, $facultyName);
unset($facultyName);
}
}
else
{
$res[] = $this->getRealData($faculty, $formData);
}
}
BeanFinder::get('LocalCache')->removeAll();
unset($faculty);
}
BeanFinder::get('LocalCache')->removeAll();
}
return $res;
}/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:34,代码来源:facultylistall4baidu.php
示例16: getDataForDiseaseDoctors
protected function getDataForDiseaseDoctors($diseaseDoctors)
{/*{{{*/
$res = array();
if (empty($diseaseDoctors)) return $res;
foreach ($diseaseDoctors as $diseaseDoctor)
{
BeanFinder::get('LocalCache')->removeAll();
$hospital = $diseaseDoctor->doctor->hospitalfaculty->hospital;
if($hospital->isNull() || $hospital->isTestHospital())
{
continue;
}
$diseaseDoctorInfo = $this->wrapDiseaseDocInfo($diseaseDoctor, $diseaseDoctor->disease);
$res[] = array(
'item' => $diseaseDoctorInfo,
);
unset($diseaseDoctorInfo);
// 二级疾病
$childredDiseases = DAL::get()->find_all_childrenDiseases('Disease', $diseaseDoctor->disease->id); // TODO
foreach ($childredDiseases as $childDisease)
{
$childrenDiseaseDocInfo = $this->wrapDiseaseDocInfo($diseaseDoctor, $childDisease);
$res[] = array(
'item' => $childrenDiseaseDocInfo,
);
unset($childrenDiseaseDocInfo);
}
}
return $res;
}/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:33,代码来源:doctorforbaidu.php
示例17: before
public function before($context)
{/*{{{*/
parent::before($context);
$group = DAL::get()->find_parent('FinanceInspectGroup');
DBC::requireTrue($group->among($context->response->curInspector), '你没有权限访问');
}/*}}}*/
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:7,代码来源:financialinterceptor.php
示例18: listOfSource
public function listOfSource($request, $response)
{
/*{{{*/
$sourcetype = $request->sourcetype;
$sourceid = $request->sourceid;
$response->projectLogs = DAL::get()->find_by_sourcetype_and_sourceid('projectlog', $sourcetype, $sourceid);
}
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:7,代码来源:projectlogmgrcontroller.php
示例19: before
public function before($context)
{
$doctorId = Codec::getInstance()->decodeId($context->request->id);
$action = $context->action;
if($context->controller == 'doctor' && $context->action == 'showreply')
{
$comment = DoctorCommentClient::getInstance()->getDoctorCommentSubClass($context->request->commentid);
$doctorId = $comment->doctor->id;
}
if($context->controller == 'doctor' && $context->action == 'addcomment')
{
$doctorId = $context->request->doctor_id;
}
if($context->controller == 'paper' && $context->action == 'showcmstagtypelist')
{
$doctorId = $context->request->searchParam;
}
$redirectActionArray = array(
'showdetail'
,'commentlist'
,'addcomment'
,'showcmstagtypelist'
,'showreply'
);
$doctorIds = DAL::get()->find_id_by_hospitalfacultyid('doctor', 0);
$isInRedirectActionArray = in_array($action, $redirectActionArray);
$isInDoctorList = in_array($doctorId, $doctorIds);
if($isInRedirectActionArray && $isInDoctorList)
{
$context->response->setRedirect('http://www.'.URL_PREFIX.'haodf.com/info/dissociatedoctornotice.php');
}
}
开发者ID:sdgdsffdsfff,项目名称:hdf-client,代码行数:32,代码来源:dissociatedoctorinterceptor.php
示例20: getDAL
public static function getDAL()
{
if (!self::$_instance) {
self::$_instance = new self();
}
return self::$_instance;
}
开发者ID:NavjotPanesar,项目名称:NavjotPanesar.com,代码行数:7,代码来源:DAL.php
注:本文中的DAL类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论