本文整理汇总了PHP中DAL::get方法的典型用法代码示例。如果您正苦于以下问题:PHP DAL::get方法的具体用法?PHP DAL::get怎么用?PHP DAL::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DAL
的用法示例。
在下文中一共展示了DAL::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}/*}}}*/
示例2: modify
public function modify($request, $response)
{
/*{{{*/
$this->myProjectOperator->checkAdminAuthOrQuit('update');
$response->projectOrgs = DAL::get()->find_all('ProjectOrg');
$response->projectOperator = DAL::get()->find('ProjectOperator', $request->projectOperatorId);
}
示例3: before
public function before($context)
{
/*{{{*/
$curOperator = DAL::get()->find("TeleOperator", $context->request->getCookie('operator'));
/**
* 如果没有登录,调到登录页面
*/
if ($curOperator->isNull()) {
header('Location:http://' . URL_PREFIX . 'callcenter.haodf.com/operator/login');
exit;
}
$bk = $context->request->getCookie('bk');
$ip = RequestDelegate::getIp();
$session = SessionDefault::singleton();
/**
* 网站用户已登录,而且允许在外网访问管理后台
* 或者
* 是超级管理员
* 可以在外放访问呼叫中心
*/
if (false == RequestDelegate::isOfficeIp()) {
if ($bk && isset($session->UserId) && BackYardAuth::authVerificationCode($bk, $session->UserId, $ip) || $curOperator->isSupperAdmin()) {
} else {
echo "本系统只允许在办公室内使用!";
exit;
}
}
}
示例4: createSitemap
public function createSitemap()
{/*{{{*/
$content = '';
$header = '<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">'."\n";
$footer = '</urlset>';
$hospitalUrlList = DAL::get()->queryAllHospitalUrl4Sitemap('hospital');
$content = $this->getData4Sitemap($hospitalUrlList);
$diseaseUrlList = DAL::get()->queryAllDiseaseUrl4Sitemap('disease');
$content .= $this->getData4Sitemap($diseaseUrlList);
$facultyUrlList = DAL::get()->queryAllFacultyUrl4Sitemap('faculty');
$content .= $this->getData4Sitemap($facultyUrlList);
$zixunUrlList = $this->getZixunUrl();
$content .= $this->getData4Sitemap($zixunUrlList);
$bookingHospitalUrlList = SpaceClient::getInstance()->getBookingHospitalUrl4Sitemap('plussignchannel');
$content .= $this->getData4Sitemap($bookingHospitalUrlList);
$data = $header.$content.$footer;
$filePath = dirname(__FILE__).'/../root/sitemap/';
$fileName = 'wwwfront.xml';
$file = $filePath.$fileName;
$fp = fopen($file,'w');
fwrite($fp, $data);
fclose($fp);
}/*}}}*/
示例5: listOfSource
public function listOfSource($request, $response)
{
/*{{{*/
$sourcetype = $request->sourcetype;
$sourceid = $request->sourceid;
$response->projectLogs = DAL::get()->find_by_sourcetype_and_sourceid('projectlog', $sourcetype, $sourceid);
}
示例6: 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;
}/*}}}*/
示例7: modify
function modify($request, $response)
{
/*{{{*/
$this->myProjectOperator->checkAdminAuthOrQuit('update');
$projectOrgId = $request->projectOrgId;
$response->projectOrg = DAL::get()->find('projectOrg', $projectOrgId);
}
示例8: 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;
}/*}}}*/
示例9: 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'));
}
示例10: 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, 'Êý¾ÝÎÊÌâ');
}
}
}/*}}}*/
示例11: 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;
}/*}}}*/
示例12: getUserIdByPatientAttachment
private function getUserIdByPatientAttachment($context)
{/*{{{*/
$encodeId = $context->request->id;
$patientAttachmentId = Codec::getInstance()->decodeId($encodeId);
$patientAttachment = DAL::get()->find('patientattachment',$patientAttachmentId);
return $patientAttachment->user->id;
}/*}}}*/
示例13: addFlowChargeOrder
public function addFlowChargeOrder($request, $response)
{
/*{{{*/
$refId = $request->getRequest('refid', true);
$ref = DAL::get()->find('DoctorPatientRef', $refId);
$isdpRef = $ref instanceof DoctorPatientRef;
$isUserSelf = $ref->user->id == $this->user->id;
$isOpenCharge = $ref->space->isChargeOpened();
DBC::requireTrue($isdpRef && $isUserSelf && $isOpenCharge, '对不起,您不能预充值');
if ($this->checkCanCharge($ref)) {
$this->message("抱歉!现在不能购买。您已经提前购买了{$ref->space->name}医生的3次指导机会,为避免资源浪费,请在使用后再次够买。", $response, array('text' => '点击这里继续', 'url' => $ref->getUrl()));
} else {
$product = ProductClient::getInstance()->getDoctorChargeFlowProduct($ref->space);
$charge = $product->salePrice;
$cashAccount = $this->user->getCashAccount();
if ($cashAccount->amount >= $charge) {
$serviceOrder = ServiceOrderClient::getInstance()->create($ref, $product, $this->user);
if (false == $serviceOrder->isNull()) {
ServiceOrderClient::getInstance()->pay($serviceOrder, $this->user);
$serviceOrder = DAL::get()->find('serviceOrder', $serviceOrder->id, true);
}
if ($serviceOrder->isPaid()) {
$response->setRedirect($serviceOrder->successUrl());
return parent::DIRECT_OUTPUT;
}
}
$url = 'http://' . URL_PREFIX . 'passport.haodf.com/telpayment/showtelaccount';
$this->message('您的余额不足,不能购买,请充值后重新购买', $response, array('text' => '去充值', 'url' => $url));
}
}
示例14: getRecommendHospitalsOfDiseaseName
public function getRecommendHospitalsOfDiseaseName($request, $response)
{/*{{{*/
$diseaseName = mb_convert_encoding($request->diseaseName, "GBK", "auto");
$disease = DAL::get()->find_similarDiseaseLimitName("disease", $diseaseName);
if($disease instanceof Disease)
{
$pageId = $request->pageId;
$pageSize = $request->pageSize;
$diseaseHospitalList = array();
$bind = array();
$binds['rank'] = 1;
$binds['needPage'] = true;
$this->_initPageInfo($pageId, $pageSize);
$res = DiseaseClient::getInstance()->getDiseaseHospitalByDisease($disease->voteDisease->id, $binds, $pageId, $pageSize);
$diseaseHospitalList = $res['diseaseHospitalList'];
$pageInfo = $this->_renamePageInfoIndex($res['pageInfo']);
$content = array();
foreach($diseaseHospitalList as $diseaseHospital)
{
$hospital = $diseaseHospital->hospital;
$hospitalInfo = array();
$hospitalInfo['phone'] = $hospital->phone;
$hospitalInfo['name'] = $hospital->name;
$hospitalInfo['url'] = $hospital->getUrl(self::getHezuoDomin());
$content[] = $hospitalInfo;
}
$response->content = array($content, $pageInfo);
}
}/*}}}*/
示例15: 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);
}