当前位置: 首页>>代码示例>>PHP>>正文


PHP apf_require_class函数代码示例

本文整理汇总了PHP中apf_require_class函数的典型用法代码示例。如果您正苦于以下问题:PHP apf_require_class函数的具体用法?PHP apf_require_class怎么用?PHP apf_require_class使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了apf_require_class函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getAreaCodesByParentId

 public function getAreaCodesByParentId($p_parentId)
 {
     apf_require_class("ORM_AnjukeORM");
     $objORM = new ORM_AnjukeORM('ajk_commtype');
     $areaCodesList = $objORM->getList("ParentId = ?", array($p_parentId), true);
     return empty($areaCodesList) ? array() : $areaCodesList;
 }
开发者ID:emilymwang8,项目名称:ajk-broker,代码行数:7,代码来源:MyDelegation.php

示例2: execute

 public function execute($input_parameters = NULL)
 {
     if (APF::get_instance()->is_debug_enabled()) {
         APF::get_instance()->debug(__CLASS__ . '[' . $this->pdo->config['dsn'] . '|' . $this->pdo->get_name() . ']' . "->execute: " . $this->queryString);
     }
     $logger = APF::get_instance()->get_logger();
     $logger->debug(__CLASS__, '[' . $this->pdo->get_name() . ']->execute: ', $this->queryString);
     APF::get_instance()->pf_benchmark_inc_begin('dbtime');
     $start = microtime(true);
     $ret = parent::execute($input_parameters);
     $end = microtime(true);
     APF::get_instance()->pf_benchmark_inc_end('dbtime');
     //add by hexin for record SQL execute time
     APF::get_instance()->pf_benchmark("sql_time", array($this->i => $end - $start));
     // 按照惯用格式记录sql执行时间和占用内存
     // added by htlv
     $tmp_time = $end - $start;
     $tmp_mem = memory_get_usage();
     apf_require_class('APF_Performance');
     APF::get_instance()->pf_benchmark("sql_time_af", array($this->i => array('sql' => $this->_sql, APF_Performance::MESSAGE_TIME => $tmp_time, APF_Performance::MESSAGE_MEMORY => $tmp_mem)));
     if (!$ret) {
         $error_info = parent::errorInfo();
         /**
          * remove duplicated error log
         $logger->error(__CLASS__, '['. $this->pdo->get_name() .']->execute: ', $this->queryString);
         $_error_info = preg_replace("#[\r\n \t]+#",' ',print_r($error_info,true));
         $logger->error(__CLASS__, '['. $this->pdo->get_name() .']->execute: ', $_error_info);
         */
         if (parent::errorCode() !== '00000') {
             throw new APF_Exception_SqlException($this->pdo->get_name() . ' | ' . $this->pdo->config['dsn'] . ' | ' . $this->queryString . ' | ' . join(' | ', $error_info), parent::errorCode());
         }
     }
     return $ret;
 }
开发者ID:emilymwang8,项目名称:cms,代码行数:34,代码来源:PDOStatement.php

示例3: get_view

 public function get_view()
 {
     $params = $this->get_params();
     $this->assign_data('menu', $params['menu']);
     $this->assign_data('index', $params['index']);
     //添加商业地产店铺城市列表
     $this->set_city_list();
     $this->assign_data('managespace_city_list', $this->managespace_city_list);
     $request = APF::get_instance()->get_request();
     $cityId = $request->getBrokerCityId();
     $this->assign_data('cityId', $cityId);
     $this->assign_data('isNewCommunityApplyCity', Bll_City::isNewCommunityApplyCity($cityId));
     //明星中介相关
     try {
         apf_require_class('Bll_Broker_StarIntermediary');
         $starBll = new Bll_Broker_StarIntermediary($cityId);
         $starIsOpen = $starBll->checkCityIfOpen();
         $brokerId = APF::get_instance()->get_request()->getBrokerId();
         $starInfo = $starBll->getBrokerNewestInfo($brokerId);
         if (empty($starInfo['broker'])) {
             $starIsOpen = 0;
         }
         $this->assign_data('starIsOpen', $starIsOpen);
     } catch (Exception $e) {
         //todo 不做任何处理,不展示明星中介内容
     }
     return "BrokerSideNav";
 }
开发者ID:emilymwang8,项目名称:ajk-broker,代码行数:28,代码来源:BrokerSideNav.php

示例4: load_stomp

 /**
  * @return APF_MQ_Stomp
  */
 public function load_stomp($name = "default")
 {
     $cfg = APF::get_instance()->get_config($name, 'mq');
     apf_require_class('APF_MQ_Stomp');
     $stomp = new APF_MQ_Stomp($cfg['uri']);
     return $stomp;
 }
开发者ID:rh20083907,项目名称:ipublish,代码行数:10,代码来源:Factory.php

示例5: insert_xprof

 public function insert_xprof()
 {
     apf_require_class('Aifang_Core_Bll_Tools_Xhprof');
     $bll = new Aifang_Core_Bll_Tools_Xhprof();
     $data = array('namespace' => $this->namespace, 'xhprof_data' => $this->xhprof_data);
     return $bll->insert_xhporf($data);
 }
开发者ID:emilymwang8,项目名称:cms,代码行数:7,代码来源:Xhprof.php

示例6: checkUserMobile

 /**
  * 检查手机是否被用户使用
  * @param $mobile 手机号
  * @return bool true已被占用 false 没有被占用
  */
 public static function checkUserMobile($params)
 {
     $userAPIDomain = APF::get_instance()->get_config("user_api_url");
     $url = $userAPIDomain . "/memberapi/m";
     $postData = array("act" => "check_user_phone", "phone" => $params['mobile']);
     $postData = http_build_query($postData);
     //curl 获取结果
     apf_require_class("APF_Http_Client_Curl");
     $curl_client = new APF_Http_Client_Curl('post');
     //创建http客户端实例
     $curl_client->set_url($url);
     //设置URL
     $curl_client->set_attribute(CURLOPT_POSTFIELDS, $postData);
     $curl_client->set_attribute(CURLOPT_HTTPHEADER, array());
     $curl_client->set_attribute(CURLOPT_POST, 1);
     $curl_client->execute();
     $res = $curl_client->get_response_text();
     //从romar的http接口中获取推荐的数据
     if (isset($res)) {
         $res = json_decode($res);
     }
     if ($res->status == 'ok' && $res->result > 0) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:emilymwang8,项目名称:ajk-broker,代码行数:32,代码来源:Register.php

示例7: handle_request_internel

 public function handle_request_internel()
 {
     apf_require_class('Bll_App_Appparams');
     $params = $this->request->get_parameters();
     $page = isset($params['page']) ? (int) $params['page'] : 1;
     $page_size = 20;
     $offset = ($page - 1) * $page_size;
     $where = '';
     $kw = strip_tags($params['kw']);
     if ($kw) {
         $where = "cache_k like '%" . $kw . "%'";
     }
     $order = 'display_order asc,id desc';
     //分页的链接
     $prev = $page === 1 ? 1 : $page - 1;
     $next = $page + 1;
     $prev_uri = '/user/appsetting/?kw=' . $kw . '&page=' . $prev;
     $next_uri = '/user/appsetting/?kw=' . $kw . '&page=' . $next;
     $prev_url = PageHelper::gen_url($prev_uri);
     $next_url = PageHelper::gen_url($next_uri);
     $list = Bll_App_Appparams::get_instance()->fetchAll('*', $where, $order, $offset, $page_size);
     if ($list && is_array($list)) {
         $app_type = $this->get_config('app', 'app');
         foreach ($list as $k => $v) {
             $list[$k]['app_type'] = $app_type[$v['app']];
             $list[$k]['update_time'] = date('Y-m-d H:i:s', $v['updated']);
             $list[$k]['edit_url'] = '/user/appsetting/edit?id=' . $v['id'];
         }
     }
     $this->request->set_attribute('kw', $kw);
     $this->request->set_attribute('list_data', $list);
     $this->request->set_attribute('prev_url', $prev_url);
     $this->request->set_attribute('next_url', $next_url);
     return 'Appsetting_List';
 }
开发者ID:emilymwang8,项目名称:cms,代码行数:35,代码来源:List.php

示例8: getCommMapCorrectTrackList

 public function getCommMapCorrectTrackList($userid, $opentime, $start, $limit)
 {
     apf_require_class("ORM_AnjukeORM");
     $orm = new ORM_AnjukeORM('log_modify_commmap');
     $rst = $orm->getList('UserId=? and PostTime > ? order by PostTime desc limit ' . $start . ',' . $limit, array($userid, $opentime), true);
     return empty($rst) ? array() : $rst;
 }
开发者ID:emilymwang8,项目名称:ajk-broker,代码行数:7,代码来源:GardenersTrack.php

示例9: load_pdo

 /**
  * Returns new instance of pdo
  *
  * @param string $name
  * @return APF_DB_PDO
  */
 public function load_pdo($name = "default")
 {
     //var_dump($name);die();
     $apf = APF::get_instance();
     if ($apf->is_debug_enabled()) {
         $apf->benchmark_begin(__CLASS__ . ": open pdo '{$name}'");
     }
     $dbcfg = APF::get_instance()->get_config($name, "database");
     //var_dump($dbcfg);die();
     apf_require_class($this->pdo_class);
     //die();
     //var_dump($pdo);die();
     $pdo = new $this->pdo_class($dbcfg['dsn'], @$dbcfg['username'], @$dbcfg['password'], isset($dbcfg['driver_options']) ? $dbcfg['driver_options'] : array());
     //var_dump($pdo);die();
     $pdo->set_name($name);
     if (isset($dbcfg['default_fetch_mode'])) {
         $pdo->set_default_fetch_mode($dbcfg['default_fetch_mode']);
     }
     if (isset($dbcfg['init_statements'])) {
         foreach ($dbcfg['init_statements'] as $sql) {
             $pdo->exec($sql);
         }
     }
     if ($apf->is_debug_enabled()) {
         $apf->benchmark_end(__CLASS__ . ": open pdo '{$name}'");
     }
     return $pdo;
 }
开发者ID:emilymwang8,项目名称:ibug,代码行数:34,代码来源:Factory.php

示例10: post

 public function post($url, array $param, $ifJson = true)
 {
     $baseHost = $this->host;
     $postUrl = "http://" . $baseHost . "/" . $url;
     if ($ifJson) {
         $postData = json_encode($param);
     } else {
         $postData = http_build_query($param);
     }
     //curl 获取结果
     apf_require_class("APF_Http_Client_Curl");
     $curl_client = new APF_Http_Client_Curl('post');
     //创建http客户端实例
     $curl_client->set_url($postUrl);
     //设置URL
     $curl_client->set_attribute(CURLOPT_POST, 1);
     $curl_client->set_attribute(CURLOPT_POSTFIELDS, $postData);
     $curl_client->execute();
     $res = $curl_client->get_response_text();
     //从romar的http接口中获取推荐的数据
     unset($curl_client);
     if (isset($res)) {
         $res = json_decode($res);
         return $res;
     } else {
         return false;
     }
 }
开发者ID:emilymwang8,项目名称:ajk-broker,代码行数:28,代码来源:UserMessageQueue.php

示例11: insert

 public function insert()
 {
     apf_require_class('Model_PersonalGalleryAI');
     $da = Model_PersonalGalleryAI::data_access();
     $da->set_field(Model_PersonalGalleryAI::STUB, 'a')->replace();
     $this->id = $da->connection->lastInsertId();
     return parent::insert();
 }
开发者ID:emilymwang8,项目名称:ajk-broker,代码行数:8,代码来源:PersonalGallery.php

示例12: get_action

 public static function get_action($action)
 {
     $class_name = $action;
     //'Ticket_Action'.$action;//先将action全部小写,然后首字母大写,得到对应的action类.
     apf_require_class($class_name);
     $ticket_action = new $class_name();
     return $ticket_action;
 }
开发者ID:emilymwang8,项目名称:ibug,代码行数:8,代码来源:Action.php

示例13: updateData

 public function updateData($id, $data)
 {
     if (intval($id) > 0) {
         apf_require_class('DAO_My_Broker_Introduction');
         $dao = new DAO_My_Broker_Introduction();
         $result = $dao->updateIntroduction($id, $data);
         return $result;
     }
 }
开发者ID:emilymwang8,项目名称:ajk-broker,代码行数:9,代码来源:Introduction.php

示例14: insertData

 public function insertData($data)
 {
     if (intval($data['BrokerId']) > 0) {
         apf_require_class('DAO_Broker_Suggestion');
         $dao = new DAO_Broker_Suggestion();
         $result = $dao->addSuggestion($data);
         return $result;
     }
 }
开发者ID:emilymwang8,项目名称:ajk-broker,代码行数:9,代码来源:Suggestion.php

示例15: updateData

 public function updateData($data)
 {
     if (intval($data['Id']) > 0) {
         apf_require_class('DAO_Broker_Suggestion');
         $dao = new DAO_Broker_Suggestion();
         $result = $dao->updateSuggestion($data['Id'], $data);
         print_r($result);
     }
 }
开发者ID:emilymwang8,项目名称:ajk-broker,代码行数:9,代码来源:NetworkSpeed.php


注:本文中的apf_require_class函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。