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


PHP Presenter::getSponsorData方法代码示例

本文整理汇总了PHP中Presenter::getSponsorData方法的典型用法代码示例。如果您正苦于以下问题:PHP Presenter::getSponsorData方法的具体用法?PHP Presenter::getSponsorData怎么用?PHP Presenter::getSponsorData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Presenter的用法示例。


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

示例1: getAllUserData


//.........这里部分代码省略.........
     require_once APPLICATION_PATH . MODEL_DIR . '/Market.php';
     require_once APPLICATION_PATH . MODEL_DIR . '/Product_credits.php';
     require_once APPLICATION_PATH . MODEL_DIR . '/Order.php';
     require_once APPLICATION_PATH . MODEL_DIR . '/Party.php';
     require_once APPLICATION_PATH . MODEL_DIR . '/Coupon_presenter_user.php';
     require_once APPLICATION_PATH . MODEL_DIR . '/User_oauth2.php';
     require_once APPLICATION_PATH . MODEL_DIR . '/Accomplishments.php';
     require_once APPLICATION_PATH . MODEL_DIR . '/Presenter_documents.php';
     require_once APPLICATION_PATH . MODEL_DIR . '/Presenter_us_tax_data.php';
     $results = new stdClass();
     //user table
     $user = new User();
     $results->user = $user->getDataById($user_id);
     //presenter
     $presenter = new Presenter();
     $results->presenter = $presenter->getDataByUserId($user_id, TRUE);
     if (!empty($results->presenter)) {
         //compliance info
         $results->presenter->compliance = $presenter->getComplianceDataByUserId($user_id, $results->presenter->market_id);
         //presenter_site
         require_once APPLICATION_PATH . MODEL_DIR . '/Presenter_site.php';
         $presenter_site = new Presenter_site();
         $results->presenter_site = $presenter_site->getDataByPresenterId($results->presenter->id);
         //presenter_us_tax_data
         require_once APPLICATION_PATH . MODEL_DIR . '/Presenter_us_tax_data.php';
         $results->presenter_us_tax_data = $presenter->getBusinessDataByPresenterId($results->presenter->id);
         //get presenter status
         require_once APPLICATION_PATH . MODEL_DIR . '/Presenter_type.php';
         $presenter_type = new Presenter_type();
         $results->presenter->status_level_id = $presenter_type->getMaxType($results->presenter->id);
         $results->presenter->status_level_name = $presenter_type->getPresenterStatusName($results->presenter->status_level_id);
         //get sponsor data
         $sponsor = new Presenter();
         $results->presenter->sponsor = $sponsor->getSponsorData($results->presenter->sponsor_id);
         //presenter info
         $results->presenter_info = new stdClass();
         $sign_up_date = new DateTime($results->presenter->consent_to_agreements);
         //to get the right end date for fast start, we ned to check if they are in a new market that had a 1 month
         //delay between sign up and sales
         $fast_start_end_date = YouniqueAPI::call("presenter/getFastStartDeadline/" . $results->presenter->presenter_sequence_id);
         $results->presenter_info->fast_start_end_date = date("M d, Y", strtotime($fast_start_end_date));
         $presenter_documents = new Presenter_documents();
         $results->presenter_documents = $presenter_documents->getPresenterDocuments($results->presenter->presenter_sequence_id);
     }
     //these have multiple records potentially, so we load them on their own
     //emails
     $email = new Email();
     $results->email = $email->getDataByUserId($user_id);
     //phones
     $phone = new Phone();
     $results->phone = $phone->getDataByUserId($user_id);
     //oauth
     $oauth = new User_oauth2();
     $results->oauth = $oauth->getDataByUserId($user_id);
     //addresses
     $address = new Address();
     $geo = new Address_geocode();
     $results->address = $address->getDataByUserId($user_id);
     //accomplishments
     $accomplishments = new Accomplishments();
     $results->accomplishments = $this->_sortAccomplishments($accomplishments->getDataByUserId($user_id));
     foreach ($results->address as $a_key => &$a_value) {
         $a_geo = $geo->getByAddressId($a_value['id']);
         if (!$a_geo) {
             continue;
         }
开发者ID:kameshwariv,项目名称:testexample,代码行数:67,代码来源:Data.php


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