本文整理汇总了PHP中utils::pexit方法的典型用法代码示例。如果您正苦于以下问题:PHP utils::pexit方法的具体用法?PHP utils::pexit怎么用?PHP utils::pexit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类utils
的用法示例。
在下文中一共展示了utils::pexit方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: insert
public function insert()
{
$address = request::postParam('mobileaddress');
$homeInfo = request::postParam('home');
$homeAddressId = implode(',', $address);
$nowTime = time();
//获取省市地区的名字,组合后保存到社区地址详情里。
$addressList = addressService::getCacheFileAddress();
$cityAddressStr = '';
foreach ($address as $aid) {
$cityAddressStr .= $addressList[$aid]['title'];
}
$homeData = array('title' => $homeInfo['title'], 'address_ids' => $homeAddressId, 'mobileaddress' => $cityAddressStr . $homeInfo['mobileaddress'], 'lng' => $homeInfo['lng'], 'lat' => $homeInfo['lat'], 'firstchar' => $homeInfo['firstchar'], 'image' => $homeInfo['image'], 'paddtime' => $nowTime);
$homeModel = homeService::getSelfModel(homeService::$modelName);
//判断是否添加了该社区。
$hasHomeInfo = homeService::getHomeInfoByTitle($homeData['title']);
if (!$hasHomeInfo) {
$homeId = $homeModel->insert($homeData);
//保存对应地址信息
homeAddressService::getSelfModel(homeAddressService::$modelName);
foreach ($address as $aid) {
$addressData = array('address_id' => $aid, 'home_id' => $homeId);
homeAddressService::$model->insert($addressData);
}
} else {
utils::pexit('已有该社区');
}
}
示例2: main
public function main()
{
$this->actionMenu = array(array('name' => '更新菜单缓存', 'url' => utils::getUrl('admin/menu/clear-menu-cache')));
$this->menuTitle = '系统信息';
utils::pexit($_SERVER);
$this->setView();
}
示例3: getHomeListByShopPoint
public function getHomeListByShopPoint($point, $square = 0.5)
{
$pointInfo = utils::getSquarePoint($point['lat'], $point['lng'], $square);
$homeParam = array('where' => "lat<>0 and lat>? and lat<? and lng>? and lng<?", 'param' => array($pointInfo['rightBottom']['lat'], $pointInfo['leftTop']['lat'], $pointInfo['leftTop']['lng'], $pointInfo['rightBottom']['lng']));
$homeList = $this->model->select($homeParam);
utils::pexit($homeList);
}